diff options
author | Hall Liu <hallliu@google.com> | 2017-02-06 10:49:48 -0800 |
---|---|---|
committer | Hall Liu <hallliu@google.com> | 2017-03-01 14:45:15 -0800 |
commit | 57006aa82a69740df73415a456d31993e2785e24 (patch) | |
tree | f5c32b9f2912e56ee4361ec0c0c94fb38ecb81f3 /telecomm/java/android/telecom/InCallService.java | |
parent | 78eed31d2d8da2f6217290da5eee8ca4f5f903ac (diff) |
Add further Connection-side APIs for RTT (part 2)
Add methods and callbacks to facilitate local and remote RTT initiation
and termination in the middle of a call. Adds @hide Connection-side APIs
to communicate with the ConnectionService, as well as plumbing for
RemoteConnections.
Test: manual, through telecom testapps
Change-Id: Ia80604b7dff8586ff222dbccdbe55e91aab02178
Diffstat (limited to 'telecomm/java/android/telecom/InCallService.java')
-rw-r--r-- | telecomm/java/android/telecom/InCallService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java index 4bc64c05bfee..5d8f9f6d5a7b 100644 --- a/telecomm/java/android/telecom/InCallService.java +++ b/telecomm/java/android/telecom/InCallService.java @@ -77,6 +77,7 @@ public abstract class InCallService extends Service { private static final int MSG_SILENCE_RINGER = 8; private static final int MSG_ON_CONNECTION_EVENT = 9; private static final int MSG_ON_RTT_UPGRADE_REQUEST = 10; + private static final int MSG_ON_RTT_INITIATION_FAILURE = 11; /** Default Handler used to consolidate binder method calls onto a single thread. */ private final Handler mHandler = new Handler(Looper.getMainLooper()) { @@ -140,6 +141,12 @@ public abstract class InCallService extends Service { mPhone.internalOnRttUpgradeRequest(callId, requestId); break; } + case MSG_ON_RTT_INITIATION_FAILURE: { + String callId = (String) msg.obj; + int reason = msg.arg1; + mPhone.internalOnRttInitiationFailure(callId, reason); + break; + } default: break; } @@ -210,6 +217,11 @@ public abstract class InCallService extends Service { public void onRttUpgradeRequest(String callId, int id) { mHandler.obtainMessage(MSG_ON_RTT_UPGRADE_REQUEST, id, 0, callId).sendToTarget(); } + + @Override + public void onRttInitiationFailure(String callId, int reason) { + mHandler.obtainMessage(MSG_ON_RTT_INITIATION_FAILURE, reason, 0, callId).sendToTarget(); + } } private Phone.Listener mPhoneListener = new Phone.Listener() { |