summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-03-03 02:02:16 +0100
committercyBerta <cyberta@riseup.net>2020-03-03 02:02:16 +0100
commit2a8d82d85f4cfd34143d87174ee022966e364f69 (patch)
treea345924ba37cbfd5fb24e89c5098c1f096f48caf /app/src/main/java/se/leap
parent2fcae35a5592aae3ac932e595717ea8d185ab606 (diff)
take vpn state into account in isVpnTetheringRunning()
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java4
1 files changed, 3 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 103462cc..7ee7bec7 100644
--- a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java
+++ b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringState.java
@@ -1,5 +1,7 @@
package se.leap.bitmaskclient.tethering;
+import de.blinkt.openvpn.core.VpnStatus;
+
public class TetheringState implements Cloneable {
public boolean isWifiTetheringEnabled;
public boolean isUsbTetheringEnabled;
@@ -42,7 +44,7 @@ public class TetheringState implements Cloneable {
}
public boolean isVpnTetheringRunning() {
- return tetherWifiVpn() || tetherUsbVpn() || tetherBluetoothVpn();
+ return (tetherWifiVpn() || tetherUsbVpn() || tetherBluetoothVpn()) && VpnStatus.isVPNActive();
}