Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bdb06ab authored by Hall Liu's avatar Hall Liu Committed by Android (Google) Code Review
Browse files

Merge "Send updateHeadsetPhoneState when child calls change" into oc-dr1-dev

parents 22c2ce9c 6a89ba2e
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public class BluetoothPhoneServiceImpl {

    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 @@ public class BluetoothPhoneServiceImpl {

        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,6 +747,7 @@ public class BluetoothPhoneServiceImpl {
                (force ||
                        (!callsPendingSwitch &&
                                (numActiveCalls != mNumActiveCalls ||
                                        numChildrenOfActiveCall != mNumChildrenOfActiveCall ||
                                        numHeldCalls != mNumHeldCalls ||
                                        bluetoothCallState != mBluetoothCallState ||
                                        !TextUtils.equals(ringingAddress, mRingingAddress) ||
@@ -758,6 +762,7 @@ public class BluetoothPhoneServiceImpl {

            mOldHeldCall = heldCall;
            mNumActiveCalls = numActiveCalls;
            mNumChildrenOfActiveCall = numChildrenOfActiveCall;
            mNumHeldCalls = numHeldCalls;
            mBluetoothCallState = bluetoothCallState;
            mRingingAddress = ringingAddress;