summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sherry Zhou <yuandizhou@google.com> 2024-04-08 17:02:31 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-04-08 17:02:31 +0000
commitfb35a600df1991ac7ea685b1f365baf16b56a20d (patch)
treee0ebc53b10e2f7a0d041663cf9bfb1a18051a723
parentfad849bcd7ee9a94e78eaaeb94f97e0013bf78fb (diff)
parent7cc30152d4ed8c35e148d75696f2d25fd5c71b36 (diff)
Merge "Fix Transit clock showing wrong color in multi-crop preview" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
index 42bd4aff1dc4..ce1aed08ab49 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
@@ -621,7 +621,9 @@ constructor(
}
private suspend fun updateClockAppearance(clock: ClockController) {
- clockController.clock = clock
+ if (!MigrateClocksToBlueprint.isEnabled) {
+ clockController.clock = clock
+ }
val colors = wallpaperColors
if (clockRegistry.seedColor == null && colors != null) {
// Seed color null means users do not override any color on the clock. The default
@@ -639,6 +641,11 @@ constructor(
if (isWallpaperDark) lightClockColor else darkClockColor
)
}
+ // In clock preview, we should have a seed color for clock
+ // before setting clock to clockEventController to avoid updateColor with seedColor == null
+ if (MigrateClocksToBlueprint.isEnabled) {
+ clockController.clock = clock
+ }
}
private fun onClockChanged() {
if (MigrateClocksToBlueprint.isEnabled) {