Merge "Fixed contrast with sfps overlay." into tm-qpr-dev am: d5822ed0f0 am: 5a2fdecfe9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20610989

Change-Id: I8f6559866c1903df31e01c7354604f2e45b3e33f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Joshua Mccloskey
2022-12-02 19:33:46 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 0 deletions

View File

@@ -133,6 +133,9 @@
<color name="biometric_dialog_accent">@color/material_dynamic_primary40</color>
<color name="biometric_dialog_error">#ffd93025</color> <!-- red 600 -->
<!-- SFPS colors -->
<color name="sfps_chevron_fill">@color/material_dynamic_primary90</color>
<!-- UDFPS colors -->
<color name="udfps_enroll_icon">#699FF3</color>
<color name="udfps_moving_target_fill">#C2D7F7</color>

View File

@@ -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) {