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

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

Merge "Update a2dp state to not playing while quitting the state machine"

parents 41c5812a b440ba99
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -126,6 +126,14 @@ final class A2dpStateMachine extends StateMachine {

    public void doQuit() {
        log("doQuit for device " + mDevice);
        if (mIsPlaying) {
            // Stop if auido is still playing
            log("doQuit: stopped playing " + mDevice);
            mIsPlaying = false;
            mA2dpService.setAvrcpAudioState(BluetoothA2dp.STATE_NOT_PLAYING);
            broadcastAudioState(BluetoothA2dp.STATE_NOT_PLAYING,
                                BluetoothA2dp.STATE_PLAYING);
        }
        quitNow();
    }