Loading src/com/android/server/telecom/BluetoothPhoneService.java +4 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public final class BluetoothPhoneService extends Service { private int mBluetoothCallState = CALL_STATE_IDLE; private String mRingingAddress = null; private int mRingingAddressType = 0; private Call mOldHeldCall = null; /** * Binder implementation of IBluetoothHeadsetPhone. Implements the command interface that the Loading Loading @@ -643,7 +644,7 @@ public final class BluetoothPhoneService extends Service { } int numActiveCalls = activeCall == null ? 0 : 1; int numHeldCalls = heldCall == null ? 0 : 1; int numHeldCalls = callsManager.getNumHeldCalls(); // 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 Loading @@ -664,6 +665,7 @@ public final class BluetoothPhoneService extends Service { bluetoothCallState != mBluetoothCallState || !TextUtils.equals(ringingAddress, mRingingAddress) || ringingAddressType != mRingingAddressType || heldCall != mOldHeldCall || force)) { // If the call is transitioning into the alerting state, send DIALING first. Loading @@ -672,6 +674,7 @@ public final class BluetoothPhoneService extends Service { boolean sendDialingFirst = mBluetoothCallState != bluetoothCallState && bluetoothCallState == CALL_STATE_ALERTING; mOldHeldCall = heldCall; mNumActiveCalls = numActiveCalls; mNumHeldCalls = numHeldCalls; mBluetoothCallState = bluetoothCallState; Loading src/com/android/server/telecom/CallsManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,16 @@ public final class CallsManager extends Call.ListenerBase { return getFirstCallWithState(CallState.ON_HOLD); } int getNumHeldCalls() { int count = 0; for (Call call : mCalls) { if (call.getParentCall() == null && call.getState() == CallState.ON_HOLD) { count++; } } return count; } Call getFirstCallWithState(int... states) { return getFirstCallWithState(null, states); } Loading Loading
src/com/android/server/telecom/BluetoothPhoneService.java +4 −1 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public final class BluetoothPhoneService extends Service { private int mBluetoothCallState = CALL_STATE_IDLE; private String mRingingAddress = null; private int mRingingAddressType = 0; private Call mOldHeldCall = null; /** * Binder implementation of IBluetoothHeadsetPhone. Implements the command interface that the Loading Loading @@ -643,7 +644,7 @@ public final class BluetoothPhoneService extends Service { } int numActiveCalls = activeCall == null ? 0 : 1; int numHeldCalls = heldCall == null ? 0 : 1; int numHeldCalls = callsManager.getNumHeldCalls(); // 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 Loading @@ -664,6 +665,7 @@ public final class BluetoothPhoneService extends Service { bluetoothCallState != mBluetoothCallState || !TextUtils.equals(ringingAddress, mRingingAddress) || ringingAddressType != mRingingAddressType || heldCall != mOldHeldCall || force)) { // If the call is transitioning into the alerting state, send DIALING first. Loading @@ -672,6 +674,7 @@ public final class BluetoothPhoneService extends Service { boolean sendDialingFirst = mBluetoothCallState != bluetoothCallState && bluetoothCallState == CALL_STATE_ALERTING; mOldHeldCall = heldCall; mNumActiveCalls = numActiveCalls; mNumHeldCalls = numHeldCalls; mBluetoothCallState = bluetoothCallState; Loading
src/com/android/server/telecom/CallsManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,16 @@ public final class CallsManager extends Call.ListenerBase { return getFirstCallWithState(CallState.ON_HOLD); } int getNumHeldCalls() { int count = 0; for (Call call : mCalls) { if (call.getParentCall() == null && call.getState() == CallState.ON_HOLD) { count++; } } return count; } Call getFirstCallWithState(int... states) { return getFirstCallWithState(null, states); } Loading