Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
t895 committed Aug 16, 2022
1 parent 8dd01ae commit e5980ec
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static void setTheme(Activity activity)
{
// We have to use shared preferences in addition to Dolphin's settings to guarantee that the
// requested theme id is ready before the onCreate method of any given Activity.
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
SharedPreferences preferences =
PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
switch (preferences.getInt(CURRENT_THEME, DEFAULT))
{
case DEFAULT:
Expand Down Expand Up @@ -79,13 +80,15 @@ public static void setTheme(Activity activity)

public static void saveTheme(Activity activity, int themeValue)
{
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
SharedPreferences preferences =
PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
preferences.edit().putInt(CURRENT_THEME, themeValue).apply();
}

public static void deleteThemeKey(Activity activity)
{
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
SharedPreferences preferences =
PreferenceManager.getDefaultSharedPreferences(activity.getApplicationContext());
preferences.edit().remove(CURRENT_THEME).apply();
activity.setTheme(R.style.Theme_Dolphin_Main);
activity.recreate();
Expand Down

0 comments on commit e5980ec

Please sign in to comment.