diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-04-06 11:47:31 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-04-06 11:47:31 -0700 |
commit | a14628a8f86b06bee82c892925642f5c3b7b5508 (patch) | |
tree | ca12cb99e6f3533abc4ab53e4686f7f3f89124a6 /subsonic-android/src | |
parent | c71a26a6be4e18266ad536bd9f1cea6ef6d8a214 (diff) | |
download | dsub-a14628a8f86b06bee82c892925642f5c3b7b5508.tar.gz dsub-a14628a8f86b06bee82c892925642f5c3b7b5508.tar.bz2 dsub-a14628a8f86b06bee82c892925642f5c3b7b5508.zip |
Revert previous two commits
Diffstat (limited to 'subsonic-android/src')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 38814ca0..f3fc4051 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -875,8 +875,11 @@ public class DownloadServiceImpl extends Service implements DownloadService { public void run() { while(isRunning) { try { - if(mediaPlayer != null && playerState == STARTED) { - cachedPosition = mediaPlayer.getCurrentPosition(); + // Add a monitor for not running while mediaPlayer state is changing + synchronized(DownloadServiceImpl.this) { + if(mediaPlayer != null && playerState == STARTED) { + cachedPosition = mediaPlayer.getCurrentPosition(); + } } Thread.sleep(200L); } |