diff options
author | cyBerta <cyberta@riseup.net> | 2021-10-23 00:59:46 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-10-23 00:59:46 +0200 |
commit | 62d2bdacec6c54f4453f1ad20425e99254998e9a (patch) | |
tree | 747403fdc550e54e6201fd464ccdc49d25bb5011 /app/src/main/java/se/leap/bitmaskclient/base/utils | |
parent | 1640f7bbfa53b84ebf539f027d5cc3c9ba441401 (diff) |
rename usePluggableTransports prefrence to useBridges, start snowflake if useBridges is true
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base/utils')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 20 |
1 files changed, 12 insertions, 8 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 cbea2815..28242388 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 @@ -33,8 +33,7 @@ import static se.leap.bitmaskclient.base.models.Constants.RESTART_ON_UPDATE; import static se.leap.bitmaskclient.base.models.Constants.SHARED_PREFERENCES; import static se.leap.bitmaskclient.base.models.Constants.SHOW_EXPERIMENTAL; import static se.leap.bitmaskclient.base.models.Constants.USE_IPv6_FIREWALL; -import static se.leap.bitmaskclient.base.models.Constants.USE_PLUGGABLE_TRANSPORTS; -import static se.leap.bitmaskclient.base.models.Constants.USE_TOR; +import static se.leap.bitmaskclient.base.models.Constants.USE_BRIDGES; /** * Created by cyberta on 18.03.18. @@ -141,12 +140,17 @@ public class PreferenceHelper { return getBoolean(context, RESTART_ON_UPDATE, false); } - public static boolean getUsePluggableTransports(Context context) { - return getBoolean(context, USE_PLUGGABLE_TRANSPORTS, false); + + public static boolean getUseBridges(SharedPreferences preferences) { + return preferences.getBoolean(USE_BRIDGES, false); + } + + public static boolean getUseBridges(Context context) { + return getBoolean(context, USE_BRIDGES, false); } - public static void usePluggableTransports(Context context, boolean isEnabled) { - putBoolean(context, USE_PLUGGABLE_TRANSPORTS, isEnabled); + public static void useBridges(Context context, boolean isEnabled) { + putBoolean(context, USE_BRIDGES, isEnabled); } public static void saveBattery(Context context, boolean isEnabled) { @@ -213,7 +217,7 @@ public class PreferenceHelper { putString(context, PREFERRED_CITY, city); } - public static Boolean useTor(SharedPreferences preferences) { + /* public static Boolean useTor(SharedPreferences preferences) { return preferences.getBoolean(USE_TOR, true); } @@ -223,7 +227,7 @@ public class PreferenceHelper { public static void setUseTor(Context context, boolean useTor) { putBoolean(context, USE_TOR, useTor); - } + }*/ public static JSONObject getEipDefinitionFromPreferences(SharedPreferences preferences) { JSONObject result = new JSONObject(); |