Merge "Fixed contrast with sfps overlay." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d5822ed0f0
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user