Wiring up the Telecomm abort flow.
Change-Id: Ie9de03507fabe09c09347b37355c8fe5ce4492b0
diff --git a/src/com/android/telecomm/CallServiceWrapper.java b/src/com/android/telecomm/CallServiceWrapper.java
index 94be7c8..15ec20d 100644
--- a/src/com/android/telecomm/CallServiceWrapper.java
+++ b/src/com/android/telecomm/CallServiceWrapper.java
@@ -24,6 +24,7 @@
import android.telecomm.CallServiceDescriptor;
import android.telecomm.ICallService;
import android.telecomm.ICallServiceAdapter;
+import android.telecomm.ICallServiceProvider;
/**
* Wrapper for {@link ICallService}s, handles binding to {@link ICallService} and keeps track of
@@ -92,11 +93,25 @@
/** See {@link ICallService#call}. */
public void call(CallInfo callInfo) {
+ String callId = callInfo.getId();
if (isServiceValid("call")) {
try {
mServiceInterface.call(callInfo);
+ mAdapter.addPendingOutgoingCallId(callId);
} catch (RemoteException e) {
- Log.e(this, e, "Failed to place call " + callInfo.getId() + ".");
+ Log.e(this, e, "Failed to place call " + callId + ".");
+ }
+ }
+ }
+
+ /** See {@link ICallService#abort}. */
+ public void abort(String callId) {
+ mAdapter.removePendingOutgoingCallId(callId);
+ if (isServiceValid("abort")) {
+ try {
+ mServiceInterface.abort(callId);
+ } catch (RemoteException e) {
+ Log.e(this, e, "Failed to abort call %s", callId);
}
}
}