From 2979517d1401a42eedcadfbe33af4af02ef0afac Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 12 Jul 2019 17:56:24 +0200 Subject: fix shared preferences location for saving last used vpn profile --- app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 8c74ae0e..a52ee790 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java @@ -148,8 +148,8 @@ public class PreferenceHelper { /** * Sets the profile that is connected (to connect if the service restarts) */ - public static void setLastUsedVpnProfile(Context c, VpnProfile connectedProfile) { - SharedPreferences prefs = Preferences.getDefaultSharedPreferences(c); + public static void setLastUsedVpnProfile(Context context, VpnProfile connectedProfile) { + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE); SharedPreferences.Editor prefsedit = prefs.edit(); prefsedit.putString(LAST_USED_PROFILE, connectedProfile.toJson()); prefsedit.apply(); -- cgit v1.2.3