diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-02-17 21:47:55 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-02-17 21:47:55 +0100 |
commit | f67d9a13693e3e051b0e774f6e2334a1a0d9c08b (patch) | |
tree | f3f82570a8e5305313ddf29b77c108d3efa21966 | |
parent | 6ebafb2c240477080e4b5d24bca26abf8f64ee8d (diff) | |
download | AntennaPod-f67d9a13693e3e051b0e774f6e2334a1a0d9c08b.zip |
Merged pull-request #346
-rw-r--r-- | src/de/danoeh/antennapod/service/playback/PlaybackService.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/service/playback/PlaybackService.java b/src/de/danoeh/antennapod/service/playback/PlaybackService.java index 132932c93..095c982e8 100644 --- a/src/de/danoeh/antennapod/service/playback/PlaybackService.java +++ b/src/de/danoeh/antennapod/service/playback/PlaybackService.java @@ -72,6 +72,7 @@ public class PlaybackService extends Service { public static final String ACTION_PLAYER_STATUS_CHANGED = "action.de.danoeh.antennapod.service.playerStatusChanged"; private static final String AVRCP_ACTION_PLAYER_STATUS_CHANGED = "com.android.music.playstatechanged"; + private static final String AVRCP_ACTION_META_CHANGED = "com.android.music.metachanged"; public static final String ACTION_PLAYER_NOTIFICATION = "action.de.danoeh.antennapod.service.playerNotification"; public static final String EXTRA_NOTIFICATION_CODE = "extra.de.danoeh.antennapod.service.notificationCode"; @@ -408,7 +409,8 @@ public class PlaybackService extends Service { sendBroadcast(new Intent(ACTION_PLAYER_STATUS_CHANGED)); updateWidget(); refreshRemoteControlClientState(newInfo); - bluetoothNotifyChange(newInfo); + bluetoothNotifyChange(newInfo, AVRCP_ACTION_PLAYER_STATUS_CHANGED); + bluetoothNotifyChange(newInfo, AVRCP_ACTION_META_CHANGED); } @Override @@ -835,7 +837,7 @@ public class PlaybackService extends Service { } } - private void bluetoothNotifyChange(PlaybackServiceMediaPlayer.PSMPInfo info) { + private void bluetoothNotifyChange(PlaybackServiceMediaPlayer.PSMPInfo info, String whatChanged) { boolean isPlaying = false; if (info.playerStatus == PlayerStatus.PLAYING) { @@ -843,7 +845,7 @@ public class PlaybackService extends Service { } if (info.playable != null) { - Intent i = new Intent(AVRCP_ACTION_PLAYER_STATUS_CHANGED); + Intent i = new Intent(whatChanged); i.putExtra("id", 1); i.putExtra("artist", ""); i.putExtra("album", info.playable.getFeedTitle()); |