aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-03-16 14:58:35 -0700
committerScott Jackson <daneren2005@gmail.com>2014-03-16 14:58:35 -0700
commitf36f68b9a0d8d07707984edfff292747810649cf (patch)
tree9a7e49663952e58a15ab6309a9822ad0dc8fffc5 /src
parent6d2a136e2bac824b7151d71f9583efbc03f622e2 (diff)
downloaddsub-f36f68b9a0d8d07707984edfff292747810649cf.tar.gz
dsub-f36f68b9a0d8d07707984edfff292747810649cf.tar.bz2
dsub-f36f68b9a0d8d07707984edfff292747810649cf.zip
Broadcast in paused state on start for Samsung's crappy bluetooth implementation
Diffstat (limited to 'src')
-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);
}