Fixed name of Tor mobile data setting. #316

This commit is contained in:
akwizgran
2016-05-03 11:43:25 +01:00
parent ea973b61c6
commit c35cad9719

View File

@@ -681,7 +681,7 @@ class TorPlugin implements DuplexPlugin, EventHandler,
boolean blocked = TorNetworkMetadata.isTorProbablyBlocked(
country);
Settings s = callback.getSettings();
boolean wifiOnly = s.getBoolean("torOverWifi", false);
boolean useMobileData = s.getBoolean("torOverMobile", true);
try {
if (!online) {
@@ -690,8 +690,8 @@ class TorPlugin implements DuplexPlugin, EventHandler,
} else if (blocked) {
LOG.info("Disabling network, country is blocked");
enableNetwork(false);
} else if (wifiOnly & !connectedToWifi) {
LOG.info("Disabling network due to wifi setting");
} else if (!useMobileData & !connectedToWifi) {
LOG.info("Disabling network due to data setting");
enableNetwork(false);
} else {
enableNetwork(true);