summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-05 23:28:48 +0100
committercyBerta <cyberta@riseup.net>2021-11-05 23:28:48 +0100
commita995b8a674ef8e89e0c86b0f113016f8fa07c716 (patch)
treefc1a22b610077e569a6d06b925acebe60859dd09 /app/src/main/java/se/leap
parentf317ef54d24d987698f7fe26eaccc53b0a51fe12 (diff)
reset tor proxy port used by okhttp on bridges settings disabled
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java
index 28242388..663e339e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java
@@ -14,6 +14,7 @@ import java.util.Set;
import de.blinkt.openvpn.VpnProfile;
import se.leap.bitmaskclient.base.models.Provider;
+import se.leap.bitmaskclient.tor.TorStatusObservable;
import static android.content.Context.MODE_PRIVATE;
import static se.leap.bitmaskclient.base.models.Constants.ALLOW_TETHERING_BLUETOOTH;
@@ -151,6 +152,9 @@ public class PreferenceHelper {
public static void useBridges(Context context, boolean isEnabled) {
putBoolean(context, USE_BRIDGES, isEnabled);
+ if (!isEnabled) {
+ TorStatusObservable.setProxyPort(-1);
+ }
}
public static void saveBattery(Context context, boolean isEnabled) {