diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-03-24 20:14:07 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-03-24 20:14:07 -0700 |
commit | e17f51685e633ca2fff6512cf44e87ad660aa396 (patch) | |
tree | 0999356851b5ebc739ad567bda097fffb094e706 /src/github/daneren2005 | |
parent | 16c52863b91af751eaa108fdc816c1c71e7c8fdd (diff) | |
download | dsub-e17f51685e633ca2fff6512cf44e87ad660aa396.tar.gz dsub-e17f51685e633ca2fff6512cf44e87ad660aa396.tar.bz2 dsub-e17f51685e633ca2fff6512cf44e87ad660aa396.zip |
When looping back to start, start first in stopped position instead of null
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 8220f6f0..a4d2c508 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -728,9 +728,15 @@ public class DownloadService extends Service { play(index, start, 0); } private synchronized void play(int index, boolean start, int position) { - if (index < 0 || index >= size()) { + int size = this.size(); + if (index < 0 || index >= size) { reset(); - setCurrentPlaying(null, false); + if(index >= size && size != 0) { + setCurrentPlaying(0, false); + Util.hidePlayingNotification(this, this, handler); + } else { + setCurrentPlaying(null, false); + } lifecycleSupport.serializeDownloadQueue(); } else { if(nextPlayingTask != null) { |