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

Commit 3c9fd018 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am b0632c0a: am e39c95f1: am bab57a49: am 5d4f98c4: Merge "Update AVRCP play...

am b0632c0a: am e39c95f1: am bab57a49: am 5d4f98c4: Merge "Update AVRCP play status only if music is streaming" into lmp-dev

* commit 'b0632c0a':
  Update AVRCP play status only if music is streaming
parents 5133c59d b0632c0a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -471,6 +471,9 @@ public final class Avrcp {
    private void updateA2dpAudioState(int state) {
        boolean isPlaying = (state == BluetoothA2dp.STATE_PLAYING);
        if (isPlaying != isPlayingState(mCurrentPlayState)) {
            /* if a2dp is streaming, check to make sure music is active */
            if ( (isPlaying) && !mAudioManager.isMusicActive())
                return;
            updatePlayPauseState(isPlaying ? RemoteControlClient.PLAYSTATE_PLAYING :
                                 RemoteControlClient.PLAYSTATE_PAUSED,
                                 RemoteControlClient.PLAYBACK_POSITION_INVALID);