Wiring up the Telecomm abort flow.
Change-Id: Ie9de03507fabe09c09347b37355c8fe5ce4492b0
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 2babb4e..f40d4ea 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -169,14 +169,14 @@
}
/**
- * Aborts ongoing attempts to connect this call. No-op once the call is connected or has been
- * disconnected. See {@link #disconnect} for already-connected calls.
+ * Aborts ongoing attempts to connect this call. Only applicable to {@link CallState#NEW}
+ * outgoing calls. See {@link #disconnect} for already-connected calls.
*/
void abort() {
- if (mState == CallState.NEW ||
- mState == CallState.DIALING ||
- mState == CallState.RINGING) {
-
+ if (mState == CallState.NEW) {
+ if (mCallService != null) {
+ mCallService.abort(mId);
+ }
clearCallService();
clearCallServiceSelector();
mState = CallState.ABORTED;