summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/InCallAdapter.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2016-03-14 15:18:07 -0700
committerTyler Gunn <tgunn@google.com>2016-03-14 23:26:34 +0000
commit876dbfb4767da4a2ba5459d5b78fb6eb55e4516f (patch)
tree163ef4c1fc05a90706df68b25d02ac51489bd6ec /telecomm/java/android/telecom/InCallAdapter.java
parent791a1546484f643e98a4bb245c3b7c302b894f78 (diff)
Add API support for multi-endpoint.
This CL includes changes required to support multi-endpoint (see the design doc linked off the bug). Main changes include: - support for indicating if a call/connection is "external" to the device. - support for indicating if an external call can be pulled from the remote device to the local device. - API used to initiate a pull of a call external to the current device to the current device. - Made the "connection event" API public (was previously @hide); this will be used to support passing some error events involving pulling calls to the incall ui. - Added new InCallService metadata which will be used to determine if an InCallService wants to be informed of external calls. - New disconnect causes which will be used to expose the fact that a multi-endpoint call was answered elsewhere and that a call ended because it was pulled to another device. - New call log call types to indicate if calls were answered elsewhere or pulled to another device. Bug: 27458894 Change-Id: I423f64ff965b5e50194635a51868c327782db2a1
Diffstat (limited to 'telecomm/java/android/telecom/InCallAdapter.java')
-rw-r--r--telecomm/java/android/telecom/InCallAdapter.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index 0cf7212ba55b..52ef4a705e05 100644
--- a/telecomm/java/android/telecom/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.os.Bundle;
import android.os.RemoteException;
import com.android.internal.telecom.IInCallAdapter;
@@ -251,6 +252,32 @@ public final class InCallAdapter {
}
/**
+ * Instructs Telecom to pull an external call to the local device.
+ *
+ * @param callId The callId to pull.
+ */
+ public void pullExternalCall(String callId) {
+ try {
+ mAdapter.pullExternalCall(callId);
+ } catch (RemoteException ignored) {
+ }
+ }
+
+ /**
+ * Intructs Telecom to send a call event.
+ *
+ * @param callId The callId to send the event for.
+ * @param event The event.
+ * @param extras Extras associated with the event.
+ */
+ public void sendCallEvent(String callId, String event, Bundle extras) {
+ try {
+ mAdapter.sendCallEvent(callId, event, extras);
+ } catch (RemoteException ignored) {
+ }
+ }
+
+ /**
* Instructs Telecom to turn the proximity sensor on.
*/
public void turnProximitySensorOn() {