diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-09-19 17:44:50 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-09-19 17:44:50 -0700 |
commit | a997ad7a145fe3767cf8326ece7cd6bf7e10c2b1 (patch) | |
tree | ee1492f4b382ad24f43d9ef9da6d28374d0a706a | |
parent | f5806c658df40382007f523c337de94e4f413b46 (diff) | |
download | dsub-a997ad7a145fe3767cf8326ece7cd6bf7e10c2b1.tar.gz dsub-a997ad7a145fe3767cf8326ece7cd6bf7e10c2b1.tar.bz2 dsub-a997ad7a145fe3767cf8326ece7cd6bf7e10c2b1.zip |
Fixes #734: Auto skip uncached songs when no network
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/DownloadService.java | 2 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/Util.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index cec98865..1ee099cd 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -2160,7 +2160,7 @@ public class DownloadService extends Service { checkArtistRadio(); } - if (!Util.isNetworkConnected(this, true) || Util.isOffline(this)) { + if (!Util.isAllowedToDownload(this)) { return; } diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java index 5151c5d6..b69ea55e 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Util.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java @@ -1125,7 +1125,7 @@ public final class Util { } public static boolean isAllowedToDownload(Context context) { - return !isWifiRequiredForDownload(context) || isWifiConnected(context); + return isNetworkConnected(context, true) && !isOffline(context); } public static boolean isWifiRequiredForDownload(Context context) { SharedPreferences prefs = getPreferences(context); |