mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-12 13:05:53 +00:00
Fix logic for metered/non-metered wifi run condition
This commit is contained in:
parent
8dbf9ba953
commit
b456249f62
1 changed files with 3 additions and 3 deletions
|
@ -209,9 +209,9 @@ public class RunConditionMonitor {
|
||||||
// Run on wifi.
|
// Run on wifi.
|
||||||
if (prefRunOnWifi && isWifiOrEthernetConnection()) {
|
if (prefRunOnWifi && isWifiOrEthernetConnection()) {
|
||||||
if (prefRunOnMeteredWifi) {
|
if (prefRunOnMeteredWifi) {
|
||||||
// Check if we are on metered wifi and if wifi whitelist run condition is met.
|
// We are on non-metered or metered wifi. Check if wifi whitelist run condition is met.
|
||||||
if (isMeteredNetworkConnection() && wifiWhitelistConditionMet(prefWifiWhitelistEnabled, whitelistedWifiSsids)) {
|
if (wifiWhitelistConditionMet(prefWifiWhitelistEnabled, whitelistedWifiSsids)) {
|
||||||
Log.v(TAG, "decideShouldRun: prefRunOnWifi && isWifiOrEthernetConnection && prefRunOnMeteredWifi && isMeteredNetworkConnection && wifiWhitelistConditionMet");
|
Log.v(TAG, "decideShouldRun: prefRunOnWifi && isWifiOrEthernetConnection && prefRunOnMeteredWifi && wifiWhitelistConditionMet");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue