From 38c21b2be2e106739438d515a3aa9b41148437c7 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 17 Mar 2023 19:09:59 +0000 Subject: [PATCH] Match SFPS Keyguard color to the bouncer secondary color The SFPS visual indicator should match the color of the delete and enter buttons of the bouncer. This CL updates the colors to match. Also send that the AUTH_REASON is from the keyguard when the sideFps affordance is requested to show for the alternate bouncer so that the themed colors get applied since the biometric prompt & enrollment do NOT apply theme colors. Test: manually bring up bouncer (both primary and alternate) and see the SFPS affordance matches the color of the delete and enter num key buttons on the PIN bouncer Fixes: 270563217 Change-Id: I96d786cd2f035f0b936a3e1327b8a57652c2eb64 --- .../android/systemui/biometrics/SideFpsController.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt index b62c729f1c191..e5c8b3cc9ac76 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt @@ -199,7 +199,7 @@ constructor( scope.launch { alternateBouncerInteractor.isVisible.collect { isVisible: Boolean -> if (isVisible) { - show(SideFpsUiRequestSource.ALTERNATE_BOUNCER) + show(SideFpsUiRequestSource.ALTERNATE_BOUNCER, REASON_AUTH_KEYGUARD) } else { hide(SideFpsUiRequestSource.ALTERNATE_BOUNCER) } @@ -440,13 +440,17 @@ private fun LottieAnimationView.addOverlayDynamicColor( @BiometricOverlayConstants.ShowReason reason: Int ) { fun update() { - val c = context.getColor(R.color.biometric_dialog_accent) - val chevronFill = context.getColor(R.color.sfps_chevron_fill) val isKeyguard = reason == REASON_AUTH_KEYGUARD if (isKeyguard) { + val color = context.getColor(R.color.numpad_key_color_secondary) // match bouncer color + val chevronFill = + com.android.settingslib.Utils.getColorAttrDefaultColor( + context, + android.R.attr.textColorPrimaryInverse + ) for (key in listOf(".blue600", ".blue400")) { addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) { - PorterDuffColorFilter(c, PorterDuff.Mode.SRC_ATOP) + PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP) } } addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {