aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-03-11 19:20:22 -0700
committerScott Jackson <daneren2005@gmail.com>2013-03-11 19:20:22 -0700
commit640fa0455ec3695eb375080232fb8703642f6678 (patch)
tree980b3b77927a2380ee0bbd15e0105070b71d0797 /subsonic-android/src/github
parentdc63abf439994255fff6f6c972a4acf3c872fdbe (diff)
downloaddsub-640fa0455ec3695eb375080232fb8703642f6678.tar.gz
dsub-640fa0455ec3695eb375080232fb8703642f6678.tar.bz2
dsub-640fa0455ec3695eb375080232fb8703642f6678.zip
Don't check position in UI thread
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 058b8eef..5a097ef7 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -811,18 +811,13 @@ public class DownloadServiceImpl extends Service implements DownloadService {
Runnable runnable = new Runnable() {
@Override
public void run() {
- handler.post(new Runnable() {
- @Override
- public void run() {
- if(mediaPlayer != null && getPlayerState() == STARTED) {
- try {
- cachedPosition = mediaPlayer.getCurrentPosition();
- } catch(Exception e) {
- executorService.shutdown();
- }
- }
+ if(mediaPlayer != null && getPlayerState() == STARTED) {
+ try {
+ cachedPosition = mediaPlayer.getCurrentPosition();
+ } catch(Exception e) {
+ executorService.shutdown();
}
- });
+ }
}
};
executorService = Executors.newSingleThreadScheduledExecutor();