remove unused thememode code

Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Harry Bond 2024-12-29 21:43:24 +00:00
parent 2e66ac4182
commit c953ffd70a

View file

@ -404,10 +404,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
return true;
ThemeSwitcher.INSTANCE.restart(false);
ThemeMode mode = ThemeMode.getInstance(requireContext().getApplicationContext(), themeName);
CharSequence summary = pref.getEntries()[mode.ordinal()];
pref.setSummary(summary);
return true;
});
}
@ -505,31 +501,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
getSettingsActivity().onBackPressed();
}
enum ThemeMode
{
FOLLOW_SYSTEM(R.string.theme_follow_system),
DEFAULT(R.string.theme_default),
NIGHT(R.string.theme_night);
private final int mModeStringId;
ThemeMode(@StringRes int modeStringId)
{
mModeStringId = modeStringId;
}
@NonNull
public static ThemeMode getInstance(@NonNull Context context, @NonNull String src)
{
for (ThemeMode each : values())
{
if (context.getResources().getString(each.mModeStringId).equals(src))
return each;
}
return FOLLOW_SYSTEM;
}
}
public enum SpeedCameraMode
{
AUTO,