release-request-62c3045b-4fac-455c-b27e-5c82d9790366-for-git_oc-dr1-release-4241171 snap-temp-L59500000088705621
Change-Id: I3670641ead5cf6b36a5a2ca03a3dbbf4b1c8d1fd
diff --git a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
index 54ff22b..93d4f71 100644
--- a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
+++ b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
@@ -79,6 +79,7 @@
private int mNumActiveCalls = 0;
private int mNumHeldCalls = 0;
+ private int mNumChildrenOfActiveCall = 0;
private int mBluetoothCallState = CALL_STATE_IDLE;
private String mRingingAddress = null;
private int mRingingAddressType = 0;
@@ -710,6 +711,8 @@
int numActiveCalls = activeCall == null ? 0 : 1;
int numHeldCalls = mCallsManager.getNumHeldCalls();
+ int numChildrenOfActiveCall = activeCall == null ? 0 : activeCall.getChildCalls().size();
+
// Intermediate state for GSM calls which are in the process of being swapped.
// TODO: Should we be hardcoding this value to 2 or should we check if all top level calls
// are held?
@@ -744,10 +747,11 @@
(force ||
(!callsPendingSwitch &&
(numActiveCalls != mNumActiveCalls ||
- numHeldCalls != mNumHeldCalls ||
- bluetoothCallState != mBluetoothCallState ||
- !TextUtils.equals(ringingAddress, mRingingAddress) ||
- ringingAddressType != mRingingAddressType ||
+ numChildrenOfActiveCall != mNumChildrenOfActiveCall ||
+ numHeldCalls != mNumHeldCalls ||
+ bluetoothCallState != mBluetoothCallState ||
+ !TextUtils.equals(ringingAddress, mRingingAddress) ||
+ ringingAddressType != mRingingAddressType ||
(heldCall != mOldHeldCall && !ignoreHeldCallChange))))) {
// If the call is transitioning into the alerting state, send DIALING first.
@@ -758,6 +762,7 @@
mOldHeldCall = heldCall;
mNumActiveCalls = numActiveCalls;
+ mNumChildrenOfActiveCall = numChildrenOfActiveCall;
mNumHeldCalls = numHeldCalls;
mBluetoothCallState = bluetoothCallState;
mRingingAddress = ringingAddress;