diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-03-04 17:30:51 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-03-04 17:30:51 -0800 |
commit | 4391e7f6e53226e8434050e9306e655684c761b9 (patch) | |
tree | 51e72a3520a1793b223728921a59f9dedb4d1fc9 /src/github/daneren2005 | |
parent | bd5a26c07c2fb787ef8ae430f33768a1dc09cc8a (diff) | |
download | dsub-4391e7f6e53226e8434050e9306e655684c761b9.tar.gz dsub-4391e7f6e53226e8434050e9306e655684c761b9.tar.bz2 dsub-4391e7f6e53226e8434050e9306e655684c761b9.zip |
Fix double clicking pausing on headsets pausing after going to next song
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 5 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 2 |
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 24c710dd..562d621c 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -981,6 +981,9 @@ public class DownloadService extends Service { next(false); } public synchronized void next(boolean forceCutoff) { + next(forceCutoff, false); + } + public synchronized void next(boolean forceCutoff, boolean forceStart) { // If only one song, just skip within song if(size() == 1) { seekTo(getPlayerPosition() + FAST_FORWARD); @@ -1015,7 +1018,7 @@ public class DownloadService extends Service { nextPlayingIndex++; } if (index != -1 && nextPlayingIndex < size()) { - play(nextPlayingIndex, playerState != PAUSED && playerState != STOPPED && playerState != IDLE); + play(nextPlayingIndex, playerState != PAUSED && playerState != STOPPED && playerState != IDLE || forceStart); } } diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index fa0e66af..278c7e4f 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -334,7 +334,7 @@ public class DownloadServiceLifecycleSupport { lastPressTime = System.currentTimeMillis(); downloadService.togglePlayPause(); } else { - downloadService.next(); + downloadService.next(false, true); } break; case RemoteControlClient.FLAG_KEY_MEDIA_PREVIOUS: |