From c48d742fa392a3aa9651f3c05f996eb663691dee Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 11 Mar 2023 18:42:50 +0100 Subject: [PATCH] Changed to defaultSharedPreferences --- app/src/main/java/com/cappielloantonio/play/App.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/cappielloantonio/play/App.java b/app/src/main/java/com/cappielloantonio/play/App.java index 0b51d80f..528070fa 100644 --- a/app/src/main/java/com/cappielloantonio/play/App.java +++ b/app/src/main/java/com/cappielloantonio/play/App.java @@ -9,7 +9,6 @@ import androidx.preference.PreferenceManager; import com.cappielloantonio.play.helper.ThemeHelper; import com.cappielloantonio.play.subsonic.Subsonic; import com.cappielloantonio.play.subsonic.SubsonicPreferences; -import com.cappielloantonio.play.util.Constants; import com.cappielloantonio.play.util.Preferences; import com.google.android.material.color.DynamicColors; @@ -30,7 +29,7 @@ public class App extends Application { instance = new App(); context = getApplicationContext(); - preferences = getSharedPreferences(Constants.SHARED_PREF_KEY, Context.MODE_PRIVATE); + preferences = PreferenceManager.getDefaultSharedPreferences(context); } public static App getInstance() { @@ -58,7 +57,7 @@ public class App extends Application { public SharedPreferences getPreferences() { if (preferences == null) { - preferences = getSharedPreferences(Constants.SHARED_PREF_KEY, Context.MODE_PRIVATE); + preferences = PreferenceManager.getDefaultSharedPreferences(context); } return preferences;