From 9a0675cdc9d8921ba1f003dc7953aae082d1c705 Mon Sep 17 00:00:00 2001 From: Hank Sheng Date: Fri, 20 May 2022 09:02:19 +0000 Subject: [PATCH] Apply the glifv3 theme when the theme string in intentExtra is glifv4. Create the short-term solution for the issue in settings page. The issue is because when we set to use glifv4 theme, the theme util in settings do not have that version(glifv4) info in their util so that they will roll back to the glif v1 theme. Current solution is rollback to the glifv3 first. screenshot: https://hsv.googleplex.com/5599282846498816 https://hsv.googleplex.com/5354235030929408 Bug: 233032365 Bug: 233036258 Change-Id: I7cdd25d34eee6dd8593c550ac803de5852ad870c --- src/com/android/settings/SetupWizardUtils.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java index e0292ef5b9c..e0e9073a220 100644 --- a/src/com/android/settings/SetupWizardUtils.java +++ b/src/com/android/settings/SetupWizardUtils.java @@ -48,6 +48,9 @@ public class SetupWizardUtils { if (WizardManagerHelper.isAnySetupWizard(intent)) { if (ThemeHelper.isSetupWizardDayNightEnabled(context)) { switch (theme) { + // TODO(b/233032365): Create glif v4 theme for this case. + case ThemeHelper.THEME_GLIF_V4_LIGHT: + case ThemeHelper.THEME_GLIF_V4: case ThemeHelper.THEME_GLIF_V3_LIGHT: case ThemeHelper.THEME_GLIF_V3: return R.style.GlifV3Theme_DayNight; @@ -60,8 +63,11 @@ public class SetupWizardUtils { } } else { switch (theme) { + // TODO(b/233032365): Create glif v4 theme for this case. + case ThemeHelper.THEME_GLIF_V4_LIGHT: case ThemeHelper.THEME_GLIF_V3_LIGHT: return R.style.GlifV3Theme_Light; + case ThemeHelper.THEME_GLIF_V4: case ThemeHelper.THEME_GLIF_V3: return R.style.GlifV3Theme; case ThemeHelper.THEME_GLIF_V2_LIGHT: @@ -76,6 +82,9 @@ public class SetupWizardUtils { } } else { switch (theme) { + // TODO(b/233032365): Create glif v4 theme for this case. + case ThemeHelper.THEME_GLIF_V4_LIGHT: + case ThemeHelper.THEME_GLIF_V4: case ThemeHelper.THEME_GLIF_V3_LIGHT: case ThemeHelper.THEME_GLIF_V3: return R.style.GlifV3Theme;