summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java30
1 files changed, 23 insertions, 7 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..44831049 100644
--- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
+++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
@@ -2,7 +2,6 @@ package se.leap.bitmaskclient.utils;
import android.content.Context;
import android.content.SharedPreferences;
-import android.os.Looper;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -10,12 +9,6 @@ import android.support.annotation.Nullable;
import org.json.JSONException;
import org.json.JSONObject;
-import java.io.ByteArrayInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -239,6 +232,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);