diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-10-04 15:56:55 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-10-04 15:56:55 -0700 |
commit | 2421212b8339c5712ce85f55ab2137bda2483d04 (patch) | |
tree | dd8e93403702243a9e5d06243193277958014904 /src | |
parent | 157ff5887feece779da13157ea71cbe4a8e8899c (diff) | |
download | dsub-2421212b8339c5712ce85f55ab2137bda2483d04.tar.gz dsub-2421212b8339c5712ce85f55ab2137bda2483d04.tar.bz2 dsub-2421212b8339c5712ce85f55ab2137bda2483d04.zip |
#90 Add option to not pause on headphone disconnect
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index dbdd830d..ef11ea22 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -141,7 +141,11 @@ public class DownloadServiceLifecycleSupport { @Override public void run() { if(!downloadService.isRemoteEnabled()) { - downloadService.pause(); + SharedPreferences prefs = Util.getPreferences(downloadService); + int pausePref = Integer.parseInt(prefs.getString(PREFERENCES_KEY_PAUSE_DISCONNECT, "0")); + if(pausePref == 0 || pausePref == 1) { + downloadService.pause(); + } } } }); |