From 9e3c21bae54a894bd6305e7c728e67d800782e23 Mon Sep 17 00:00:00 2001 From: Joshua McCloskey Date: Thu, 1 Dec 2022 17:34:21 +0000 Subject: [PATCH] Fixed contrast with sfps overlay. Tested various different themes 1. Choose a color in settings > wallpapers > basic colors 2. Go through enrollment 3. Verify that light/dark theme have appropriate contrast. Test: Manually verified the contrast works for light/dark themes and various different basic color styles. Fixes: 243008680 Change-Id: I63900a8df21a3fe0f02e5da0db6e3b75520fce12 --- packages/SystemUI/res/values/colors.xml | 3 +++ .../src/com/android/systemui/biometrics/SideFpsController.kt | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 4ce0852901ff1..4133056dcc57f 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -133,6 +133,9 @@ @color/material_dynamic_primary40 #ffd93025 + + @color/material_dynamic_primary90 + #699FF3 #C2D7F7 diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt index 1c3dd451a1d32..e09e65e1b4799 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt @@ -370,11 +370,15 @@ private fun WindowInsets.hasBigNavigationBar(): Boolean = private fun LottieAnimationView.addOverlayDynamicColor(context: Context) { fun update() { val c = context.getColor(R.color.biometric_dialog_accent) + val chevronFill = context.getColor(R.color.sfps_chevron_fill) for (key in listOf(".blue600", ".blue400")) { addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) { PorterDuffColorFilter(c, PorterDuff.Mode.SRC_ATOP) } } + addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) { + PorterDuffColorFilter(chevronFill, PorterDuff.Mode.SRC_ATOP) + } } if (composition != null) {