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

Commit a08ff547 authored by Nitin Srivastava's avatar Nitin Srivastava Committed by Matthew Xie
Browse files

MHF: Return the correct connection state for headset.

When more than 1 headset is connected, return the correct
connection state for a headset other than latest connected
headset.
bug 16514538
Change-Id: Id07165f2c023959b7a457a1c1c0ed5c227838973
parent 97600f2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2051,7 +2051,7 @@ final class HeadsetStateMachine extends StateMachine {
            }

            if (currentState == mConnected || currentState == mAudioOn) {
                if (mCurrentDevice.equals(device)) {
                if (mConnectedDevicesList.contains(device)) {
                    return BluetoothProfile.STATE_CONNECTED;
                }
                return BluetoothProfile.STATE_DISCONNECTED;