From b456249f6258e9337a19cc5d6a98334219e16640 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sat, 28 Jul 2018 02:19:19 +0200 Subject: [PATCH] Fix logic for metered/non-metered wifi run condition --- .../syncthingandroid/service/RunConditionMonitor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/service/RunConditionMonitor.java b/app/src/main/java/com/nutomic/syncthingandroid/service/RunConditionMonitor.java index b5bc11a1..fcdfd3f4 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/service/RunConditionMonitor.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/service/RunConditionMonitor.java @@ -209,9 +209,9 @@ public class RunConditionMonitor { // Run on wifi. if (prefRunOnWifi && isWifiOrEthernetConnection()) { if (prefRunOnMeteredWifi) { - // Check if we are on metered wifi and if wifi whitelist run condition is met. - if (isMeteredNetworkConnection() && wifiWhitelistConditionMet(prefWifiWhitelistEnabled, whitelistedWifiSsids)) { - Log.v(TAG, "decideShouldRun: prefRunOnWifi && isWifiOrEthernetConnection && prefRunOnMeteredWifi && isMeteredNetworkConnection && wifiWhitelistConditionMet"); + // We are on non-metered or metered wifi. Check if wifi whitelist run condition is met. + if (wifiWhitelistConditionMet(prefWifiWhitelistEnabled, whitelistedWifiSsids)) { + Log.v(TAG, "decideShouldRun: prefRunOnWifi && isWifiOrEthernetConnection && prefRunOnMeteredWifi && wifiWhitelistConditionMet"); return true; } } else {