From 2b0c617a0b2e6f59db2f8dae4a117ceabcb7b977 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 19 Oct 2019 01:54:20 +0200 Subject: save preferences in LEAPpreferences --- .../main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/src/main') 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 44b2a45d..9eac7187 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java @@ -218,7 +218,7 @@ public class PreferenceHelper { if (context == null) { return false; } - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE); return preferences.getBoolean(USE_PLUGGABLE_TRANSPORTS, false); } @@ -226,7 +226,7 @@ public class PreferenceHelper { if (context == null) { return; } - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE); preferences.edit().putBoolean(USE_PLUGGABLE_TRANSPORTS, isEnabled).apply(); } @@ -234,7 +234,7 @@ public class PreferenceHelper { if (context == null) { return; } - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE); preferences.edit().putBoolean(DEFAULT_SHARED_PREFS_BATTERY_SAVER, isEnabled).apply(); } @@ -242,7 +242,7 @@ public class PreferenceHelper { if (context == null) { return false; } - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); + SharedPreferences preferences = context.getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE); return preferences.getBoolean(DEFAULT_SHARED_PREFS_BATTERY_SAVER, false); } -- cgit v1.2.3