From a997ad7a145fe3767cf8326ece7cd6bf7e10c2b1 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 19 Sep 2016 17:44:50 -0700 Subject: Fixes #734: Auto skip uncached songs when no network --- app/src/main/java/github/daneren2005/dsub/service/DownloadService.java | 2 +- app/src/main/java/github/daneren2005/dsub/util/Util.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') 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); -- cgit v1.2.3