Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e3c21ba authored by Joshua McCloskey's avatar Joshua McCloskey
Browse files

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
parent 6303152e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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>
+4 −0
Original line number Diff line number Diff line
@@ -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) {