summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-04-11 15:55:43 -0700
committerEvan Charlton <evanc@google.com>2014-04-11 16:02:15 -0700
commit3c7fbb2214368689e8868ca1f37c3490429c4b05 (patch)
treea633e4dbe6803639ff86e64ccc4788b0e1c1ec07 /telecomm
parent792e41fe2a26cc7d41d192bd29b267550afbcdb5 (diff)
downloadframeworks_base-3c7fbb2214368689e8868ca1f37c3490429c4b05.zip
frameworks_base-3c7fbb2214368689e8868ca1f37c3490429c4b05.tar.gz
frameworks_base-3c7fbb2214368689e8868ca1f37c3490429c4b05.tar.bz2
Expose a method to cancel an outgoing call
Expose a method which lets CallServiceSelectors abort an outgoing call. Bug: 13980764 Change-Id: Id0c608729cb5de3e2a37b2538f1f61ed94bcb31b
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);
}