summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkateshwarlu Domakonda <vdomak@codeaurora.org>2015-10-01 16:31:34 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-13 01:37:20 -0800
commita9fe56b2a0d2bcb6d8bd2c035a2c4b00723f4d59 (patch)
tree803419196e49c94ed3fb33f40b1ac6363492d7d0
parent169cf11d15a5b7c9344136cece0527899ceb11fc (diff)
downloadandroid_packages_apps_Bluetooth-a9fe56b2a0d2bcb6d8bd2c035a2c4b00723f4d59.tar.gz
android_packages_apps_Bluetooth-a9fe56b2a0d2bcb6d8bd2c035a2c4b00723f4d59.tar.bz2
android_packages_apps_Bluetooth-a9fe56b2a0d2bcb6d8bd2c035a2c4b00723f4d59.zip
A2DP Sink: Fix the issue with pause cmd send
Send pause in suspend state. Added a debug log to know the playStatus. CRs-Fixed: 917001 Change-Id: I4c8e8006a274b101330bee23d886812e4ef19895
-rw-r--r--src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java3
-rw-r--r--src/com/android/bluetooth/avrcp/AvrcpControllerService.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java b/src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java
index 321713e3c..2aa61a301 100644
--- a/src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java
+++ b/src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java
@@ -1103,9 +1103,6 @@ final class A2dpSinkStateMachine extends StateMachine {
AvrcpControllerService avrcpCtrlService = AvrcpControllerService.getAvrcpControllerService();
if ((avrcpCtrlService != null) && (mDevice != null) &&
(avrcpCtrlService.getConnectedDevices().contains(mDevice))){
- if (mPlayingDevice == null){
- return true; // don't send Pause if we are not playing already.
- }
avrcpCtrlService.sendPassThroughCmd(mDevice, AVRC_ID_PAUSE, KEY_STATE_PRESSED);
avrcpCtrlService.sendPassThroughCmd(mDevice, AVRC_ID_PAUSE, KEY_STATE_RELEASED);
log(" SendPassThruPause command sent - ");
diff --git a/src/com/android/bluetooth/avrcp/AvrcpControllerService.java b/src/com/android/bluetooth/avrcp/AvrcpControllerService.java
index 90245e058..bab1cf277 100644
--- a/src/com/android/bluetooth/avrcp/AvrcpControllerService.java
+++ b/src/com/android/bluetooth/avrcp/AvrcpControllerService.java
@@ -308,7 +308,8 @@ public class AvrcpControllerService extends ProfileService {
public String toString() {
return "Metadata [artist=" + artist + " trackTitle= " + trackTitle + " albumTitle= " +
albumTitle + " genre= " +genre+" trackNum= "+Long.toString(trackNum) + " cur_time: "+
- Long.toString(playTime) + " total_time = "+ Long.toString(totalTrackLen) + "]";
+ Long.toString(playTime) + " total_time = "+ Long.toString(totalTrackLen) +
+ "playStatus=" + playStatus + "]";
}
};