aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java1
-rw-r--r--src/github/daneren2005/dsub/util/Util.java6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index a846c1a7..be74ef86 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -759,6 +759,7 @@ public class DownloadService extends Service {
}
private synchronized void playNext(boolean start) {
// Swap the media players since nextMediaPlayer is ready to play
+ Util.broadcastPlaybackStatusChange(this, currentPlaying.getSong(), PlayerState.PREPARED);
if(start) {
nextMediaPlayer.start();
} else if(!nextMediaPlayer.isPlaying()) {
diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java
index 933d3777..72886329 100644
--- a/src/github/daneren2005/dsub/util/Util.java
+++ b/src/github/daneren2005/dsub/util/Util.java
@@ -1317,7 +1317,7 @@ public final class Util {
intent.putExtra("state", "stop");
avrcpIntent.putExtra("playing", false);
break;
- case PAUSED:
+ case PAUSED: case PREPARED:
intent.putExtra("state", "pause");
avrcpIntent.putExtra("playing", false);
break;
@@ -1330,7 +1330,9 @@ public final class Util {
}
addTrackInfo(context, song, avrcpIntent);
- context.sendBroadcast(intent);
+ if(state != PlayerState.PREPARED) {
+ context.sendBroadcast(intent);
+ }
context.sendBroadcast(avrcpIntent);
}