aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-04-06 11:47:31 -0700
committerScott Jackson <daneren2005@gmail.com>2013-04-06 11:47:31 -0700
commita14628a8f86b06bee82c892925642f5c3b7b5508 (patch)
treeca12cb99e6f3533abc4ab53e4686f7f3f89124a6
parentc71a26a6be4e18266ad536bd9f1cea6ef6d8a214 (diff)
downloaddsub-a14628a8f86b06bee82c892925642f5c3b7b5508.tar.gz
dsub-a14628a8f86b06bee82c892925642f5c3b7b5508.tar.bz2
dsub-a14628a8f86b06bee82c892925642f5c3b7b5508.zip
Revert previous two commits
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java7
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);
}