diff options
author | Mallikarjuna GB <gbmalli@codeaurora.org> | 2015-06-04 18:20:21 +0530 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-06-04 10:24:52 -0700 |
commit | 0ae2df8877ab703fbdeb33c89bc7a694af5611ed (patch) | |
tree | fde9649f551ed7415d4d1f623a346d941a7b0eaf /src/com/android/server/telecom/BluetoothPhoneServiceImpl.java | |
parent | 2ebf0b733e737d3169058718f4fe7e97d698380a (diff) | |
download | android_packages_services_Telecomm-0ae2df8877ab703fbdeb33c89bc7a694af5611ed.tar.gz android_packages_services_Telecomm-0ae2df8877ab703fbdeb33c89bc7a694af5611ed.tar.bz2 android_packages_services_Telecomm-0ae2df8877ab703fbdeb33c89bc7a694af5611ed.zip |
BT: Send proper updates to headset for call swap
Use case:
1. Connect BT headset.
2. Make MO/MT call.
3. Make another MO/MT call.
4. When one call is active, another is on hold, swap calls from headset.
5. Check call held indicators sent to headset.
Failure:
1. Calls swapped and CIEV 7,2 and CIEV 7,1 is sent on GSM network.
2. For CDMA, calls swapped with in active CDMA conference but no held
call indicator is sent.
Root cause:
1. In gsm network, when active and held calls are swapped, firstly
active call is put to hold making held call count as 2 and
BluetoothPhoneService updates callheld indicator as no call active.
After this, next update comes to make original held call as active
and again callheld indicator as active and held is updated.
2. For CDMA, when calls are swapped, no call held indicator is sent
from Telephony.
Fix:
1. In gsm network, avoid unnecessary callheld indicator update as CIEV7,2
for call swapping.
2. In cdma network, send callheld indicator for call swap within
active conference.
Change-Id: I385e9b383c5c71cab2bf300669695d2fa66bd38c
Diffstat (limited to 'src/com/android/server/telecom/BluetoothPhoneServiceImpl.java')
-rw-r--r-- | src/com/android/server/telecom/BluetoothPhoneServiceImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java index ad3e10de..0058caa0 100644 --- a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java +++ b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java @@ -459,6 +459,8 @@ public final class BluetoothPhoneServiceImpl { } else if (chld == CHLD_TYPE_HOLDACTIVE_ACCEPTHELD) { if (activeCall != null && activeCall.can(Connection.CAPABILITY_SWAP_CONFERENCE)) { activeCall.swapConference(); + Log.i(TAG, "CDMA calls in conference swapped, updating headset"); + updateHeadsetWithCallState(true /* force */); return true; } else if (ringingCall != null) { mCallsManager.answerCall(ringingCall, 0); @@ -628,6 +630,7 @@ public final class BluetoothPhoneServiceImpl { int numActiveCalls = activeCall == null ? 0 : 1; int numHeldCalls = mCallsManager.getNumHeldCalls(); + boolean callsSwitched = (numHeldCalls == 2); // For conference calls which support swapping the active call within the conference // (namely CDMA calls) we need to expose that as a held call in order for the BT device @@ -660,7 +663,7 @@ public final class BluetoothPhoneServiceImpl { !TextUtils.equals(ringingAddress, mRingingAddress) || ringingAddressType != mRingingAddressType || (heldCall != mOldHeldCall && !ignoreHeldCallChange) || - force)) { + force) && !callsSwitched) { // If the call is transitioning into the alerting state, send DIALING first. // Some devices expect to see a DIALING state prior to seeing an ALERTING state |