diff options
author | Tyler Gunn <tgunn@google.com> | 2018-06-06 18:08:05 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-06-06 18:08:05 -0700 |
commit | 3193b1537c9b31b8345cfb98ea7fc1d7d3ee0ac2 (patch) | |
tree | d6750bd985b426190d1ebc33854f88cdf51de326 /telecomm/java/android/telecom/ConnectionService.java | |
parent | b4411d65ee2df971768d2667d33911234a39b096 (diff) | |
parent | 6823c8a822167a2a362aaae7ee36644c6de0e309 (diff) |
Merge "Merge "Ensure self-managed calls use voip audio mode." am: b62aa315d1 am: fd3e10b1bc" into pi-dev-plus-aosp
am: 6823c8a822
Change-Id: I1352a44cbb55fdeeb79771b27055a70b83a3cbb8
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionService.java')
-rw-r--r-- | telecomm/java/android/telecom/ConnectionService.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 9d784907a87f..2291090f9daf 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -1531,6 +1531,14 @@ public abstract class ConnectionService extends Service { new DisconnectCause(DisconnectCause.ERROR, "IMPL_RETURNED_NULL_CONNECTION")); } + boolean isSelfManaged = + (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED) + == Connection.PROPERTY_SELF_MANAGED; + // Self-managed Connections should always use voip audio mode; we default here so that the + // local state within the ConnectionService matches the default we assume in Telecom. + if (isSelfManaged) { + connection.setAudioModeIsVoip(true); + } connection.setTelecomCallId(callId); if (connection.getState() != Connection.STATE_DISCONNECTED) { addConnection(request.getAccountHandle(), callId, connection); @@ -1570,9 +1578,7 @@ public abstract class ConnectionService extends Service { createIdList(connection.getConferenceables()), connection.getExtras())); - if (isIncoming && request.shouldShowIncomingCallUi() && - (connection.getConnectionProperties() & Connection.PROPERTY_SELF_MANAGED) == - Connection.PROPERTY_SELF_MANAGED) { + if (isIncoming && request.shouldShowIncomingCallUi() && isSelfManaged) { // Tell ConnectionService to show its incoming call UX. connection.onShowIncomingCallUi(); } |