summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorBen Gilad <gilad@google.com>2014-01-15 13:58:57 -0800
committerEvan Charlton <evanc@google.com>2014-02-20 15:12:51 -0800
commitf042a3f067b47a92c67d994ba3e24bf41636e4f9 (patch)
treea804d55d2700f53da59e953d0a63e5e74e595105 /telecomm
parent2e412075baaac8066265618e1a0d5186aced74c4 (diff)
downloadframeworks_base-f042a3f067b47a92c67d994ba3e24bf41636e4f9.zip
frameworks_base-f042a3f067b47a92c67d994ba3e24bf41636e4f9.tar.gz
frameworks_base-f042a3f067b47a92c67d994ba3e24bf41636e4f9.tar.bz2
Following up on our discussion offline to introduce response objects for isSwitchable.
Change-Id: Ic1385d9b67ed0a859128845574d48ad90d6152a2
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecomm/ICallServiceSelector.aidl10
-rw-r--r--telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl36
2 files changed, 40 insertions, 6 deletions
diff --git a/telecomm/java/android/telecomm/ICallServiceSelector.aidl b/telecomm/java/android/telecomm/ICallServiceSelector.aidl
index db742ac..13a3f4c 100644
--- a/telecomm/java/android/telecomm/ICallServiceSelector.aidl
+++ b/telecomm/java/android/telecomm/ICallServiceSelector.aidl
@@ -18,6 +18,7 @@ package android.telecomm;
import android.telecomm.ICallService;
import android.telecomm.ICallServiceSelectionResponse;
+import android.telecomm.ICallSwitchabilityResponse;
import java.util.List;
@@ -83,13 +84,10 @@ oneway interface ICallServiceSelector {
/**
* Determines if the specified ongoing call can/should be switched from the currently-used
* call service to another.
- * TODO(gilad): Do we want to add a dedicated response type, introduce a generic one (and use
- * it across the board), or eliminate this altogether (i.e. relying on "select" to return the
- * empty set in the cases this would have returned false)?
+ * TODO(gilad): Pass a CallInfo instead that contains (among other fields) the callId.
*
* @param callId The identifier of the call to disconnect.
- * TODO(gilad): Consider passing a reduced-visibility call object, e.g. using Call externally
- * and PackagePrivateCall within Telecomm (where the latter can be wrapped by the former).
+ * @param response The response object to be populated and returned to switchboard.
*/
- void isSwitchable(String callId);
+ void isSwitchable(String callId, in ICallSwitchabilityResponse response);
}
diff --git a/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl b/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl
new file mode 100644
index 0000000..628ad6b
--- /dev/null
+++ b/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telecomm;
+
+/**
+ * Used by {@link ICallServiceSelector}s to return whether or not the relevant
+ * call is switchable.
+ * @hide
+ */
+oneway interface ICallSwitchabilityResponse {
+ /**
+ * Records whether or not the corresponding call can potentially be switched to another
+ * call service.
+ *
+ * @param isSwitchable True if the associated call-service selector may be interested
+ * in switching call services. Setting isSwitchable to true should generally
+ * guarantee the "select" API of the associated selector to be invoked, hence
+ * allowing the selector to return either the empty list (meaning pass, don't
+ * switch) or the prioritized list of call-services to attempt switching to.
+ */
+ void setIsSwitchable(boolean isSwitchable);
+}