Loading res/xml-v26/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="light" /> app:defaultValue="light" app:isPreferenceVisible="false"/> <SwitchPreference app:defaultValue="false" app:key="pref_pure_black_night_mode" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading res/xml-v29/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="system" /> app:defaultValue="system" app:isPreferenceVisible="false"/> <SwitchPreference app:defaultValue="false" app:key="pref_pure_black_night_mode" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading res/xml/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="light" /> app:defaultValue="light" app:isPreferenceVisible="false"/> <SwitchPreference app:key="pref_pure_black_night_mode" app:defaultValue="false" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading src/com/android/calendar/DynamicTheme.java +11 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,17 @@ public class DynamicTheme { } private static String getTheme(Context context) { return Utils.getSharedPreference(context, THEME_PREF, systemThemeAvailable() ? SYSTEM : LIGHT); /** * Migrate the user preferences to system default mode. * It makes sure we don't unnecessarily access a wrong resource as we have disabled the option to switch themes. */ final String themePreference = Utils.getSharedPreference(context, THEME_PREF, SYSTEM); if (themePreference.equalsIgnoreCase(BLACK) || themePreference.equalsIgnoreCase(DARK) || themePreference.equalsIgnoreCase(LIGHT)) { Utils.setSharedPreference(context, THEME_PREF, SYSTEM); } return themePreference; } private static int getSelectedTheme(Activity activity) { Loading Loading
res/xml-v26/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="light" /> app:defaultValue="light" app:isPreferenceVisible="false"/> <SwitchPreference app:defaultValue="false" app:key="pref_pure_black_night_mode" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading
res/xml-v29/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="system" /> app:defaultValue="system" app:isPreferenceVisible="false"/> <SwitchPreference app:defaultValue="false" app:key="pref_pure_black_night_mode" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading
res/xml/general_preferences.xml +6 −3 Original line number Diff line number Diff line Loading @@ -22,17 +22,20 @@ app:title="@string/preferences_theme" app:entries="@array/pref_theme_entries" app:entryValues="@array/pref_theme_values" app:defaultValue="light" /> app:defaultValue="light" app:isPreferenceVisible="false"/> <SwitchPreference app:key="pref_pure_black_night_mode" app:defaultValue="false" app:title="@string/preferences_pure_black_night_mode" /> app:title="@string/preferences_pure_black_night_mode" app:isPreferenceVisible="false"/> <Preference app:key="pref_color" app:title="@string/preferences_color" app:entries="@array/pref_color_entries" app:entryValues="@array/pref_color_values" app:defaultValue="teal" /> app:defaultValue="teal" app:isPreferenceVisible="false"/> <ListPreference app:key="preferences_default_start" app:defaultValue="-2" Loading
src/com/android/calendar/DynamicTheme.java +11 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,17 @@ public class DynamicTheme { } private static String getTheme(Context context) { return Utils.getSharedPreference(context, THEME_PREF, systemThemeAvailable() ? SYSTEM : LIGHT); /** * Migrate the user preferences to system default mode. * It makes sure we don't unnecessarily access a wrong resource as we have disabled the option to switch themes. */ final String themePreference = Utils.getSharedPreference(context, THEME_PREF, SYSTEM); if (themePreference.equalsIgnoreCase(BLACK) || themePreference.equalsIgnoreCase(DARK) || themePreference.equalsIgnoreCase(LIGHT)) { Utils.setSharedPreference(context, THEME_PREF, SYSTEM); } return themePreference; } private static int getSelectedTheme(Activity activity) { Loading