summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sherry Zhou <yuandizhou@google.com> 2024-04-06 00:12:59 +0000
committer Sherry Zhou <yuandizhou@google.com> 2024-04-06 00:12:59 +0000
commit7cc30152d4ed8c35e148d75696f2d25fd5c71b36 (patch)
tree0620d6a664f039be31987c5348d078a938186a93
parenta036797ee5c835831783b7dad46ad6d4f3bdef34 (diff)
Fix Transit clock showing wrong color in multi-crop preview
Flag: ACONFIG com.android.systemui.migrate_clocks_to_blueprint STAGING Bug: 332558510 Test: manual Change-Id: I0f54e916f2c47b8dc52628a3f9dbcc226ae3e87b
-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 9195b4f4e7fc..eab4522271f4 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
@@ -617,7 +617,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
@@ -635,6 +637,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) {