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

Commit 253717d3 authored by Satish Kodishala's avatar Satish Kodishala Committed by Linux Build Service Account
Browse files

HF: Do not remove connect defer messages in Connected state

When we are in AudioOn state and  headset2 is connected,
we disconnect SCO and move to Connected state. If we remove the
connect defer message from the queue, we will not be able to
connect to the headset2.

CRs-fixed: 916103
Change-Id: Ideb077108ab6b7e7a0caf0f881960c7c53bbd330
parent 263e0e48
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -820,11 +820,6 @@ final class HeadsetStateMachine extends StateMachine {
    private class Connected extends State {
        @Override
        public void enter() {
            // Remove pending connection attempts that were deferred during the pending
            // state. This is to prevent auto connect attempts from disconnecting
            // devices that previously successfully connected.
            // TODO: This needs to check for multiple HFP connections, once supported...
            removeDeferredMessages(CONNECT);
            Log.d(TAG, "Enter Connected: " + getCurrentMessage().what +
                           ", size: " + mConnectedDevicesList.size());
            // start phone state listener here so that the CIND response as part of SLC can be