diff options
author | cyBerta <cyberta@riseup.net> | 2021-11-06 02:52:38 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-11-06 02:52:38 +0100 |
commit | eb434ae79f45dfd5c14c0901c414a287221442d4 (patch) | |
tree | 73b4c8553940127021f8e888a897f707d62b6281 /app/src/main/java/se/leap/bitmaskclient/providersetup | |
parent | 8a7b455f011842d17de687b7cbb2b6589b78ac3f (diff) |
fix tor provider setup fallback mechanism
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/providersetup')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java index 555eb21d..c385c4c4 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerBase.java @@ -191,7 +191,9 @@ public abstract class ProviderApiManagerBase { } try { - startTorProxy(); + if (PreferenceHelper.getUseBridges(preferences)) { + startTorProxy(); + } } catch (InterruptedException | IllegalStateException e) { e.printStackTrace(); return; @@ -301,8 +303,8 @@ public abstract class ProviderApiManagerBase { } protected boolean startTorProxy() throws InterruptedException, IllegalStateException, TimeoutException { - if (PreferenceHelper.getUseBridges(preferences) && - EipStatus.getInstance().isDisconnected() && + if (EipStatus.getInstance().isDisconnected() && + PreferenceHelper.getUseTor(preferences) && serviceCallback.isConnectedToWifi() ) { serviceCallback.startTorService(); |