Merge branch '316-mobile-data-setting' into 'master'

Fix name of Tor mobile data setting

Closes #316.

See merge request !167
This commit is contained in:
akwizgran
2016-05-03 14:39:22 +00:00

View File

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