summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java2
2 files changed, 5 insertions, 1 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 7bbd032e..06fb25e9 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
@@ -165,6 +165,10 @@ public class PreferenceHelper {
return preferences.getBoolean(USE_TOR, true);
}
+ public static Boolean getUseTor(Context context) {
+ return getBoolean(context, USE_TOR, true);
+ }
+
public static void saveBattery(Context context, boolean isEnabled) {
putBoolean(context, DEFAULT_SHARED_PREFS_BATTERY_SAVER, isEnabled);
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
index c45d7ae9..94d3e0de 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java
@@ -212,7 +212,7 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB
* @throws IllegalStateException thrown if this method was not called from a background thread
*/
private void initTorServiceConnection(Context context) throws InterruptedException, IllegalStateException {
- if (PreferenceHelper.getUseBridges(context)) {
+ if (PreferenceHelper.getUseTor(context)) {
if (torServiceConnection == null) {
Log.d(TAG, "serviceConnection is still null");
if (!TorService.hasClientTransportPlugin()) {