Merge "Remove dependency of SudGlifTheme from SettingsTheme" into tm-dev

This commit is contained in:
Menghan Li
2022-04-01 05:56:13 +00:00
committed by Android (Google) Code Review
3 changed files with 14 additions and 12 deletions

View File

@@ -102,11 +102,7 @@ public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivit
private void applyTheme() {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
if (ThemeHelper.trySetDynamicColor(this)) {
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
}
setTheme(R.style.SettingsPreferenceTheme_SetupWizard);
ThemeHelper.trySetDynamicColor(this);
}
}

View File

@@ -96,12 +96,8 @@ public class SettingsBaseActivity extends FragmentActivity implements CategoryHa
final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
if (isAnySetupWizard && this instanceof SubSettings) {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
if (ThemeHelper.trySetDynamicColor(this)) {
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
}
setTheme(R.style.SettingsPreferenceTheme_SetupWizard);
ThemeHelper.trySetDynamicColor(this);
}
if (isToolbarEnabled() && !isAnySetupWizard) {