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

Commit 98b95518 authored by Alex Leung's avatar Alex Leung Committed by android-build-merger
Browse files

Merge "Fix bug with broadcasting the wrong audio state" am: 5c1f7b10

am: 4d863fb6

Change-Id: I0ed64157ac404e5d39c114adcb0a78bf9221ad78
parents 2d2b5d81 4d863fb6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -627,16 +627,16 @@ public class A2dpSinkStateMachine extends StateMachine {
                    mStreaming.obtainMessage(A2dpSinkStreamHandler.SRC_STR_START).sendToTarget();
                    if (mPlayingDevice == null) {
                        mPlayingDevice = device;
                        broadcastAudioState(device, BluetoothA2dpSink.STATE_NOT_PLAYING,
                                BluetoothA2dpSink.STATE_PLAYING);
                        broadcastAudioState(device, BluetoothA2dpSink.STATE_PLAYING,
                                BluetoothA2dpSink.STATE_NOT_PLAYING);
                    }
                    break;
                case AUDIO_STATE_REMOTE_SUSPEND:
                case AUDIO_STATE_STOPPED:
                    mStreaming.obtainMessage(A2dpSinkStreamHandler.SRC_STR_STOP).sendToTarget();
                    if (mPlayingDevice != null) {
                        broadcastAudioState(device, BluetoothA2dpSink.STATE_PLAYING,
                                BluetoothA2dpSink.STATE_NOT_PLAYING);
                        broadcastAudioState(device, BluetoothA2dpSink.STATE_NOT_PLAYING,
                                BluetoothA2dpSink.STATE_PLAYING);
                        mPlayingDevice = null;
                    }
                    break;