Update DefaultClockProvider colors
This is largely a cherry-pick of change I6b32776dac1853eeab87c2a65da69478e4da5b75 but with some notable changes to accomadate existing code differences in tm-qpr-dev. - We use a boolean instead of an enum for clock region darkness as the enum is in a different place in tm-qpr-dev. - We clean up some of the initialization code in ClockEventController to prevent testing issues and provide a dependency injection point to the screenshot test. - Pull the clock color setting from the theme when region sampling is disabled instead of defaulting to always dark. Test: Manually validated colors matched reference images on light and dark backgrounds with the region sampling feature both enabled and disabled. Bug: 229771520 Change-Id: I7906850b5de7f512f55e47e1122dfaacbc9c9406 (cherry picked from commit a724e0b7)
Showing
- packages/SystemUI/ktfmt_includes.txt 7 additions, 0 deletionspackages/SystemUI/ktfmt_includes.txt
- packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockProviderPlugin.kt 3 additions, 4 deletions...n/src/com/android/systemui/plugins/ClockProviderPlugin.kt
- packages/SystemUI/shared/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt 8 additions, 12 deletions...om/android/systemui/shared/clocks/DefaultClockProvider.kt
- packages/SystemUI/shared/src/com/android/systemui/shared/regionsampling/RegionDarkness.kt 0 additions, 0 deletions.../android/systemui/shared/regionsampling/RegionDarkness.kt
- packages/SystemUI/src/com/android/keyguard/ClockEventController.kt 29 additions, 23 deletions...SystemUI/src/com/android/keyguard/ClockEventController.kt
- packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt 1 addition, 0 deletions...ests/src/com/android/keyguard/ClockEventControllerTest.kt
Loading
Please register or sign in to comment