summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/utils
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-12-07 16:50:41 +0100
committercyBerta <cyberta@riseup.net>2018-12-07 16:50:41 +0100
commit9b832c4386f0f839006df68dd75d98fc173344d0 (patch)
tree378cfcb2e03885f786f41ffb04aef0eaf0d971a3 /app/src/main/java/se/leap/bitmaskclient/utils
parent1f5095b59c93b04120a2e10f0b083b4f6846ca68 (diff)
first shot gatewayselection
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/utils')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
index b1da1284..11582d87 100644
--- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
+++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
@@ -31,6 +31,7 @@ import static se.leap.bitmaskclient.Constants.PREFERENCES_APP_VERSION;
import static se.leap.bitmaskclient.Constants.PROVIDER_CONFIGURED;
import static se.leap.bitmaskclient.Constants.PROVIDER_EIP_DEFINITION;
import static se.leap.bitmaskclient.Constants.PROVIDER_PRIVATE_KEY;
+import static se.leap.bitmaskclient.Constants.PROVIDER_PROFILE_UUID;
import static se.leap.bitmaskclient.Constants.PROVIDER_VPN_CERTIFICATE;
import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES;
@@ -239,6 +240,29 @@ public class PreferenceHelper {
return result;
}
+ /*public static void saveLastProfile(Context context, String uuid) {
+ if (context == null) {
+ return;
+ }
+ putString(context, PROVIDER_PROFILE_UUID, uuid);
+ }
+
+ public static void clearLastProfile(Context context) {
+ if (context == null) {
+ return;
+ }
+ SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE);
+ preferences.edit().remove(PROVIDER_PROFILE_UUID).apply();
+ }
+
+ public static String getLastProfile(Context context){
+ return getString(context, PROVIDER_PROFILE_UUID, null);
+ }
+
+ public static void saveLastGatewayNumber(Context context, int number) {
+
+ }
+*/
public static String getString(Context context, String key, String defValue) {
SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE);
return preferences.getString(key, defValue);