diff options
| author | 2023-06-08 19:02:58 +0000 | |
|---|---|---|
| committer | 2023-06-08 19:03:57 +0000 | |
| commit | 6f99676c45918a79fcf292a07cbc137a847fcf1d (patch) | |
| tree | 1f592bfe559705d040dd376ba432e65743d2b604 | |
| parent | 6994621472dbdb92f18de6c0c7af17abff8630ad (diff) | |
Conform the logic to decide wallpaper darkness
Make sure that the logic of deciding if the wallpaper is dark or light
is the same as defined in Tonal.
Test: Manaully tested the color is the same as the lock screen
Bug: 286425611
Change-Id: I4b66edb86008ad817028eb444d4b121ae054631e
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt | 3 |
1 files changed, 1 insertions, 2 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 db231092d7a5..1c2e85b0fd3a 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 @@ -404,8 +404,7 @@ constructor( val darkClockColor = wallpaperColorScheme?.accent2?.s600 /** Note that when [wallpaperColors] is null, isWallpaperDark is true. */ val isWallpaperDark: Boolean = - (wallpaperColors?.colorHints?.and(WallpaperColors.HINT_SUPPORTS_DARK_TEXT)) != - WallpaperColors.HINT_SUPPORTS_DARK_TEXT + (wallpaperColors?.colorHints?.and(WallpaperColors.HINT_SUPPORTS_DARK_TEXT)) == 0 clock.events.onSeedColorChanged( if (isWallpaperDark) lightClockColor else darkClockColor ) |