diff options
author | cyBerta <cyberta@riseup.net> | 2020-03-07 01:18:58 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2020-03-07 01:18:58 +0100 |
commit | 394d4eadf0c28653c6b0fef55551c12571c9740d (patch) | |
tree | 7bca147c56157a4988aa3b42fca540dcdfc921ed /app/src/main/java/se/leap/bitmaskclient/tethering | |
parent | 649635bc8f8178aba36f07b59ada813f55dc34a0 (diff) |
disable battery save mode only if actually VPN is running and at least one tethering interface is up
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/tethering')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java index 7ee7bec7..21c378ee 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java +++ b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java @@ -1,6 +1,7 @@ package se.leap.bitmaskclient.tethering; import de.blinkt.openvpn.core.VpnStatus; +import se.leap.bitmaskclient.eip.EipStatus; public class TetheringState implements Cloneable { public boolean isWifiTetheringEnabled; @@ -44,7 +45,7 @@ public class TetheringState implements Cloneable { } public boolean isVpnTetheringRunning() { - return (tetherWifiVpn() || tetherUsbVpn() || tetherBluetoothVpn()) && VpnStatus.isVPNActive(); + return (tetherWifiVpn() || tetherUsbVpn() || tetherBluetoothVpn()) && (EipStatus.getInstance().isConnecting() || EipStatus.getInstance().isConnected() || EipStatus.getInstance().isBlocking()); } |