diff options
author | 2024-04-08 17:02:31 +0000 | |
---|---|---|
committer | 2024-04-08 17:02:31 +0000 | |
commit | fb35a600df1991ac7ea685b1f365baf16b56a20d (patch) | |
tree | e0ebc53b10e2f7a0d041663cf9bfb1a18051a723 | |
parent | fad849bcd7ee9a94e78eaaeb94f97e0013bf78fb (diff) | |
parent | 7cc30152d4ed8c35e148d75696f2d25fd5c71b36 (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.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) { |