Default pref: make sure to use app context

This commit is contained in:
ganfra 2020-09-08 15:43:32 +02:00 committed by Benoit Marty
parent c2880a5832
commit dc04d2848d
1 changed files with 1 additions and 1 deletions

View File

@ -26,6 +26,6 @@ object DefaultSharedPreferences {
fun getInstance(context: Context): SharedPreferences =
INSTANCE ?: synchronized(this) {
INSTANCE ?: PreferenceManager.getDefaultSharedPreferences(context).also { INSTANCE = it }
INSTANCE ?: PreferenceManager.getDefaultSharedPreferences(context.applicationContext).also { INSTANCE = it }
}
}