aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index c775da11..1dfc0708 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -868,13 +868,19 @@ public class DownloadServiceImpl extends Service implements DownloadService {
private class PositionCache implements Runnable {
boolean isRunning = true;
+ Thread thread;
public void stop() {
isRunning = false;
+ if(thread != null) {
+ // Make it stop right NOW
+ thread.interrupt();
+ }
}
@Override
public void run() {
+ thread = Thread.currentThread();
while(isRunning) {
try {
// Add a monitor for not running while mediaPlayer state is changing