diff options
author | cyBerta <cyberta@riseup.net> | 2021-11-09 23:33:55 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-11-09 23:33:55 +0100 |
commit | 7cd76c3eb08f89be94642a57eca7d929d8d72c6d (patch) | |
tree | bdac4e2805168ef0fc19b944dc655b8ab09d347e /app/src/main/java/se/leap/bitmaskclient/base | |
parent | 21927a346f6b2e948da254e8d1dbca7e0a49aa91 (diff) |
check tor preferences before initiating a tor service connection
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 4 |
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 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); } |