mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Update mobile data log message, simplify logic.
This commit is contained in:
@@ -701,16 +701,15 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!online || (!charging && onlyWhenCharging)) {
|
if (!online) {
|
||||||
if (!online) {
|
LOG.info("Disabling network, device is offline");
|
||||||
LOG.info("Disabling network, device is offline");
|
enableNetwork(false);
|
||||||
} else {
|
} else if (!charging && onlyWhenCharging) {
|
||||||
LOG.info("Disabling network, device is on battery");
|
LOG.info("Disabling network, device is on battery");
|
||||||
}
|
|
||||||
enableNetwork(false);
|
enableNetwork(false);
|
||||||
} else if (network == PREF_TOR_NETWORK_NEVER ||
|
} else if (network == PREF_TOR_NETWORK_NEVER ||
|
||||||
(!useMobile && !wifi)) {
|
(!useMobile && !wifi)) {
|
||||||
LOG.info("Disabling network due to setting");
|
LOG.info("Disabling network, device is using mobile data");
|
||||||
enableNetwork(false);
|
enableNetwork(false);
|
||||||
} else if (automatic && blocked && !bridgesWork) {
|
} else if (automatic && blocked && !bridgesWork) {
|
||||||
LOG.info("Disabling network, country is blocked");
|
LOG.info("Disabling network, country is blocked");
|
||||||
|
|||||||
Reference in New Issue
Block a user