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

Commit 42d50e75 authored by Sahil Sonar's avatar Sahil Sonar 💬
Browse files

Merge branch '8632-s-emerald-lag' into 'v1-s'

SystemUI: Allow disabling fingerprint ripple on unlock

See merge request e/os/android_frameworks_base!288
parents 738d0678 e5e4c881
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,4 +45,7 @@

    <!-- Whether usage of the proximity sensor during doze is supported -->
    <bool name="doze_proximity_sensor_supported">true</bool>

    <!-- Wheather to animate ripple on fingerprint unlock -->
    <bool name="config_fingerprintAuthRippleEnabled">true</bool>
</resources>
+13 −0
Original line number Diff line number Diff line
@@ -87,6 +87,13 @@ class AuthRippleController @Inject constructor(
                R.integer.auth_ripple_alpha_in_duration).toLong())
    }

    private val isRippleEnabled: Boolean = try {
        sysuiContext.resources.getBoolean(R.bool.config_fingerprintAuthRippleEnabled)
    } catch (e: Exception) {
        e.printStackTrace()
        true
    }

    @VisibleForTesting
    public override fun onViewAttached() {
        authController.addCallback(authControllerCallback)
@@ -136,6 +143,7 @@ class AuthRippleController @Inject constructor(
    }

    private fun showUnlockedRipple() {
        if (!isRippleEnabled) return
        notificationShadeWindowController.setForcePluginOpen(true, this)
        val lightRevealScrim = statusBar.lightRevealScrim
        if (statusBarStateController.isDozing || biometricUnlockController.isWakeAndUnlock) {
@@ -154,6 +162,11 @@ class AuthRippleController @Inject constructor(
    }

    override fun onKeyguardFadingAwayChanged() {
        if (!isRippleEnabled) {
            statusBar.lightRevealScrim?.revealAmount = 1f
            startLightRevealScrimOnKeyguardFadingAway = false
            return
        }
        if (keyguardStateController.isKeyguardFadingAway) {
            val lightRevealScrim = statusBar.lightRevealScrim
            if (startLightRevealScrimOnKeyguardFadingAway && lightRevealScrim != null) {