summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/CallServiceSelector.java10
-rw-r--r--telecomm/java/android/telecomm/CallServiceSelectorAdapter.java12
-rw-r--r--telecomm/java/com/android/internal/telecomm/ICallServiceSelectorAdapter.aidl2
3 files changed, 24 insertions, 0 deletions
diff --git a/telecomm/java/android/telecomm/CallServiceSelector.java b/telecomm/java/android/telecomm/CallServiceSelector.java
index 8c9495f..c9c6ff6 100644
--- a/telecomm/java/android/telecomm/CallServiceSelector.java
+++ b/telecomm/java/android/telecomm/CallServiceSelector.java
@@ -121,6 +121,16 @@ public abstract class CallServiceSelector extends Service {
}
/**
+ * Cancel the outgoing call. Any subsequent calls to {@link #select(CallInfo, List)} will be
+ * ignored.
+ *
+ * @param callInfo The call to canceled.
+ */
+ protected final void cancelOutgoingCall(CallInfo callInfo) {
+ getAdapter().cancelOutgoingCall(callInfo.getId());
+ }
+
+ /**
* Lifecycle callback which is called when this {@link CallServiceSelector} has been attached
* to a {@link CallServiceSelectorAdapter}, indicating {@link #getAdapter()} is now safe to use.
*
diff --git a/telecomm/java/android/telecomm/CallServiceSelectorAdapter.java b/telecomm/java/android/telecomm/CallServiceSelectorAdapter.java
index 8635f1a..4d2e8aa 100644
--- a/telecomm/java/android/telecomm/CallServiceSelectorAdapter.java
+++ b/telecomm/java/android/telecomm/CallServiceSelectorAdapter.java
@@ -56,6 +56,18 @@ public final class CallServiceSelectorAdapter {
}
/**
+ * Cancels the specified outgoing call.
+ *
+ * @param callId The ID of the call to cancel.
+ */
+ public void cancelOutgoingCall(String callId) {
+ try {
+ mAdapter.cancelOutgoingCall(callId);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Associates handoff information with an ongoing call. Calls can switch from one call service
* to another. Setting handle to a non-null value marks the call as switchable.
*
diff --git a/telecomm/java/com/android/internal/telecomm/ICallServiceSelectorAdapter.aidl b/telecomm/java/com/android/internal/telecomm/ICallServiceSelectorAdapter.aidl
index 1b281b9..ad71e3c 100644
--- a/telecomm/java/com/android/internal/telecomm/ICallServiceSelectorAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/ICallServiceSelectorAdapter.aidl
@@ -35,5 +35,7 @@ oneway interface ICallServiceSelectorAdapter {
String callId,
in List<CallServiceDescriptor> selectedCallServiceDescriptors);
+ void cancelOutgoingCall(String callId);
+
void setHandoffInfo(String callId, in Uri handle, in Bundle extras);
}