aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-04-06 15:20:15 -0700
committerScott Jackson <daneren2005@gmail.com>2013-04-06 15:20:15 -0700
commit4d5037b69d46b4307207c3cbde2525f93744b9df (patch)
tree0ec4418f53a820a5ca820d531c7507064f96a343 /subsonic-android/src
parenta14628a8f86b06bee82c892925642f5c3b7b5508 (diff)
downloaddsub-4d5037b69d46b4307207c3cbde2525f93744b9df.tar.gz
dsub-4d5037b69d46b4307207c3cbde2525f93744b9df.tar.bz2
dsub-4d5037b69d46b4307207c3cbde2525f93744b9df.zip
Forgot to add pause into background task
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
index 0990170e..4d8756f8 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java
@@ -252,9 +252,19 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi
pauseButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- getDownloadService().pause();
- // onCurrentChanged();
- // onProgressChanged();
+ new SilentBackgroundTask<Void>(DownloadActivity.this) {
+ @Override
+ protected Void doInBackground() throws Throwable {
+ getDownloadService().pause();
+ return null;
+ }
+
+ @Override
+ protected void done(Void result) {
+ onCurrentChanged();
+ onProgressChanged();
+ }
+ }.execute();
}
});