diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2014-10-09 11:42:10 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2014-10-10 00:31:09 -0700 |
commit | 22bad7047263a6924423d12718738fdcc7b0352c (patch) | |
tree | e2825e6269e1994d2d99ab6508c46635ba2fcb94 /src/com/android/bluetooth/avrcp/Avrcp.java | |
parent | fbb1fe1efa8459f932aed161fbcc0b5e4d52c2d5 (diff) | |
download | android_packages_apps_Bluetooth-22bad7047263a6924423d12718738fdcc7b0352c.tar.gz android_packages_apps_Bluetooth-22bad7047263a6924423d12718738fdcc7b0352c.tar.bz2 android_packages_apps_Bluetooth-22bad7047263a6924423d12718738fdcc7b0352c.zip |
Update AVRCP play status only if music is streaming
AVRCP play status was updated based on AVDTP stream state. Enhanced this
logic to update the status only when music is streaming
bug 12099469
Change-Id: Idef0180cd0d0b78fa392a5354320440fce9b81a7
Diffstat (limited to 'src/com/android/bluetooth/avrcp/Avrcp.java')
-rwxr-xr-x | src/com/android/bluetooth/avrcp/Avrcp.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/avrcp/Avrcp.java b/src/com/android/bluetooth/avrcp/Avrcp.java index ec569d3fb..618ff8f33 100755 --- a/src/com/android/bluetooth/avrcp/Avrcp.java +++ b/src/com/android/bluetooth/avrcp/Avrcp.java @@ -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); |