diff options
author | cyberta <cyberta@riseup.net> | 2021-05-18 16:13:44 +0000 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2021-05-18 16:13:44 +0000 |
commit | 15490dae1ac8670d1288367cb2ac8fd43c48a045 (patch) | |
tree | 7ee5ae99b504c5a737471f6d1d9ee331008dfc20 /app/src/main/java/se/leap/bitmaskclient/base/utils | |
parent | 48bd56b48c96cc62557675a82ac0ca1865f9aa8e (diff) | |
parent | 4b8ea1252cddfd54278676a8b2f64eb937f92c2d (diff) |
Merge branch 'gateway_selector' into 'master'
Gateway selector
See merge request leap/bitmask_android!132
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 | 9 |
1 files changed, 9 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 d31c7a20..a3d1314e 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 @@ -24,6 +24,7 @@ import static se.leap.bitmaskclient.base.models.Constants.DEFAULT_SHARED_PREFS_B import static se.leap.bitmaskclient.base.models.Constants.EXCLUDED_APPS; import static se.leap.bitmaskclient.base.models.Constants.LAST_UPDATE_CHECK; import static se.leap.bitmaskclient.base.models.Constants.LAST_USED_PROFILE; +import static se.leap.bitmaskclient.base.models.Constants.PREFERRED_CITY; import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_CONFIGURED; import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_EIP_DEFINITION; import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_PRIVATE_KEY; @@ -203,6 +204,14 @@ public class PreferenceHelper { return getBoolean(context, ALWAYS_ON_SHOW_DIALOG, true); } + public static String getPreferredCity(Context context) { + return getString(context, PREFERRED_CITY, null); + } + + public static void setPreferredCity(Context context, String city) { + putString(context, PREFERRED_CITY, city); + } + public static JSONObject getEipDefinitionFromPreferences(SharedPreferences preferences) { JSONObject result = new JSONObject(); try { |