summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/InCallService.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2018-01-22 15:17:54 -0800
committerTyler Gunn <tgunn@google.com>2018-01-25 16:20:03 -0800
commit858bfaf79c97e000af68649970994ee16bdd08ac (patch)
treef108b51758e03762937828ede7c0aac3c861ba9a /telecomm/java/android/telecom/InCallService.java
parentdf984fae2656104d84fec8fa876f2236d290da39 (diff)
Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in order to accept handovers (this is per design). Adding missing onHandoverComplete method in the android.telecom.Connection API (per design). Finishing plumbing for android.telecom.Call#onHandoverComplete API. Fix issue where the new handover API methods would never get called; the legacy handover extra was being used in this case when it should not have been. Bug: 65415068 Test: Verified using new CTS tests Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2 Merged-In: If1558f6a23911862c02ac5b18fb62d86911ed7e2
Diffstat (limited to 'telecomm/java/android/telecom/InCallService.java')
-rw-r--r--telecomm/java/android/telecom/InCallService.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 74fa62d62ccf..fcf04c9a7eef 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -81,6 +81,7 @@ public abstract class InCallService extends Service {
private static final int MSG_ON_RTT_UPGRADE_REQUEST = 10;
private static final int MSG_ON_RTT_INITIATION_FAILURE = 11;
private static final int MSG_ON_HANDOVER_FAILED = 12;
+ private static final int MSG_ON_HANDOVER_COMPLETE = 13;
/** Default Handler used to consolidate binder method calls onto a single thread. */
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -157,6 +158,11 @@ public abstract class InCallService extends Service {
mPhone.internalOnHandoverFailed(callId, error);
break;
}
+ case MSG_ON_HANDOVER_COMPLETE: {
+ String callId = (String) msg.obj;
+ mPhone.internalOnHandoverComplete(callId);
+ break;
+ }
default:
break;
}
@@ -237,6 +243,11 @@ public abstract class InCallService extends Service {
public void onHandoverFailed(String callId, int error) {
mHandler.obtainMessage(MSG_ON_HANDOVER_FAILED, error, 0, callId).sendToTarget();
}
+
+ @Override
+ public void onHandoverComplete(String callId) {
+ mHandler.obtainMessage(MSG_ON_HANDOVER_COMPLETE, callId).sendToTarget();
+ }
}
private Phone.Listener mPhoneListener = new Phone.Listener() {