Apply Glif theme before using dynamic color.

As changes are being made to remove the dependency between dynamic
color and the glifv3 theme, this sets the Glif theme before calling
trySetDymanicColor, as requested.

Bug: 219882220
Test: Build & flash; visual inspection
Change-Id: I4c28ea52411f3436c98e4689c7fa1784254fd572
This commit is contained in:
menghanli
2022-03-03 05:18:10 +08:00
parent 2164070f4a
commit b759790da1
2 changed files with 2 additions and 4 deletions

View File

@@ -110,13 +110,12 @@ 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);
} else {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
}
}