mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-12-18 08:32:24 +03:00
Unnecessary use of fully qualified name
...'PreferenceManager.getDefaultSharedPreferences' due to existing static import 'androidx.preference.PreferenceManager.getDefaultSharedPreferences' Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
4a58f52de3
commit
71aa037430
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ public class NotesApplication extends Application {
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
PREF_KEY_THEME = getString(R.string.pref_key_theme);
|
PREF_KEY_THEME = getString(R.string.pref_key_theme);
|
||||||
setAppTheme(getAppTheme(getApplicationContext()));
|
setAppTheme(getAppTheme(getApplicationContext()));
|
||||||
final var prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
final var prefs = getDefaultSharedPreferences(getApplicationContext());
|
||||||
lockedPreference = prefs.getBoolean(getString(R.string.pref_key_lock), false);
|
lockedPreference = prefs.getBoolean(getString(R.string.pref_key_lock), false);
|
||||||
isGridViewEnabled = getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_key_gridview), false);
|
isGridViewEnabled = getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_key_gridview), false);
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
@ -59,7 +59,7 @@ public class NotesApplication extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DarkModeSetting getAppTheme(Context context) {
|
public static DarkModeSetting getAppTheme(Context context) {
|
||||||
final var prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
final var prefs = getDefaultSharedPreferences(context);
|
||||||
String mode;
|
String mode;
|
||||||
try {
|
try {
|
||||||
mode = prefs.getString(PREF_KEY_THEME, DarkModeSetting.SYSTEM_DEFAULT.name());
|
mode = prefs.getString(PREF_KEY_THEME, DarkModeSetting.SYSTEM_DEFAULT.name());
|
||||||
|
|
Loading…
Reference in a new issue