diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt | 9 |
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) { |