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

Commit eed8d08a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SCO: Don't set active device if a diconnect message is defered"

parents 8e6ebafe 3f44cbcc
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1201,7 +1201,8 @@ public class HeadsetStateMachine extends StateMachine {
            // Set active device to current active SCO device when the current active device
            // Set active device to current active SCO device when the current active device
            // is different from mCurrentDevice. This is to accommodate active device state
            // is different from mCurrentDevice. This is to accommodate active device state
            // mis-match between native and Java.
            // mis-match between native and Java.
            if (!mDevice.equals(mHeadsetService.getActiveDevice())) {
            if (!mDevice.equals(mHeadsetService.getActiveDevice())
                    && !hasDeferredMessages(DISCONNECT_AUDIO)) {
                mHeadsetService.setActiveDevice(mDevice);
                mHeadsetService.setActiveDevice(mDevice);
            }
            }
            setAudioParameters();
            setAudioParameters();