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

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

Send updateHeadsetPhoneState when child calls change am: 6f80b3c3

am: 4dc9c0d8

Change-Id: Iad76d9cbc4f1bc7442a18b5162eb25c858c2c4e8
parents 971ac7b8 4dc9c0d8
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;