Merge "Fix toggle display and preferen style old style and barely seen in “Vision Settings”" into sc-dev

This commit is contained in:
Menghan Li
2021-07-06 10:07:52 +00:00
committed by Android (Google) Code Review
3 changed files with 40 additions and 5 deletions

View File

@@ -101,12 +101,22 @@ public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivit
@Override
protected void onCreate(Bundle savedState) {
super.onCreate(savedState);
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
ThemeHelper.trySetDynamicColor(this);
applyTheme();
tryLaunchFontSizeSettings();
findViewById(R.id.content_parent).setFitsSystemWindows(false);
}
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()));
}
}
@VisibleForTesting
void tryLaunchFontSizeSettings() {
if (WizardManagerHelper.isAnySetupWizard(getIntent())