Commit 7a306fb7 authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "Update AVRCP play status only if music is streaming" into lmp-dev

parents a40ac96c 22bad704
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment