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

Commit 251258ec authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Send updateHeadsetPhoneState when child calls change" into oc-dr1-dev am: 9bdb06ab

am: 4f9e42c8

Change-Id: I7e5d90e1328c0b1165ca1229cc1dedc07d3517fe
parents a39b162d 4f9e42c8
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -79,6 +79,7 @@ public class BluetoothPhoneServiceImpl {


    private int mNumActiveCalls = 0;
    private int mNumActiveCalls = 0;
    private int mNumHeldCalls = 0;
    private int mNumHeldCalls = 0;
    private int mNumChildrenOfActiveCall = 0;
    private int mBluetoothCallState = CALL_STATE_IDLE;
    private int mBluetoothCallState = CALL_STATE_IDLE;
    private String mRingingAddress = null;
    private String mRingingAddress = null;
    private int mRingingAddressType = 0;
    private int mRingingAddressType = 0;
@@ -710,6 +711,8 @@ public class BluetoothPhoneServiceImpl {


        int numActiveCalls = activeCall == null ? 0 : 1;
        int numActiveCalls = activeCall == null ? 0 : 1;
        int numHeldCalls = mCallsManager.getNumHeldCalls();
        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.
        // 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
        // TODO: Should we be hardcoding this value to 2 or should we check if all top level calls
        //       are held?
        //       are held?
@@ -744,6 +747,7 @@ public class BluetoothPhoneServiceImpl {
                (force ||
                (force ||
                        (!callsPendingSwitch &&
                        (!callsPendingSwitch &&
                                (numActiveCalls != mNumActiveCalls ||
                                (numActiveCalls != mNumActiveCalls ||
                                        numChildrenOfActiveCall != mNumChildrenOfActiveCall ||
                                        numHeldCalls != mNumHeldCalls ||
                                        numHeldCalls != mNumHeldCalls ||
                                        bluetoothCallState != mBluetoothCallState ||
                                        bluetoothCallState != mBluetoothCallState ||
                                        !TextUtils.equals(ringingAddress, mRingingAddress) ||
                                        !TextUtils.equals(ringingAddress, mRingingAddress) ||
@@ -758,6 +762,7 @@ public class BluetoothPhoneServiceImpl {


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