Properly apply the SUW dynamic color theme

Activity should apply a base theme before apply dynamic color theme

Bug: 225800660
Test: Manual testing
Change-Id: Iad6e03b1750e1a4bd29878c9eb88e8c4a08a867f
This commit is contained in:
cnchen
2022-04-01 14:57:58 +08:00
parent 1031406227
commit 27536c8333
2 changed files with 3 additions and 28 deletions

View File

@@ -54,13 +54,8 @@ public abstract class WifiDppBaseActivity extends InstrumentedActivity {
}
private void applyTheme() {
if (ThemeHelper.trySetDynamicColor(this)) {
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
} else {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
}
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
setTheme(R.style.SettingsPreferenceTheme_SetupWizard);
ThemeHelper.trySetDynamicColor(this);
}
}