summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/utils
diff options
context:
space:
mode:
authorJanak Amarasena <janakamarasena@gmail.com>2018-07-08 16:33:46 +0530
committerJanak Amarasena <janakamarasena@gmail.com>2018-07-08 16:33:46 +0530
commite4eceb400d73dd9060868e055a72ed25b290e9ec (patch)
treecff73372686fcab9090506602f957bcfc1f86a8e /app/src/main/java/se/leap/bitmaskclient/utils
parentb86acf45a0f3f673fdf9f4be9161dda3dcab307a (diff)
Added custom layout for donation popup
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/utils')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java10
1 files changed, 10 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 12015dfb..5f739ce1 100644
--- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
+++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java
@@ -1,5 +1,6 @@
package se.leap.bitmaskclient.utils;
+import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Looper;
@@ -239,4 +240,13 @@ public class PreferenceHelper {
return result;
}
+ public static String getString(Context context, String key, String defValue) {
+ SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE);
+ return preferences.getString(key, defValue);
+ }
+
+ public static void putString(Context context, String key, String value){
+ SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE);
+ preferences.edit().putString(key, value).apply();
+ }
}