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

Commit e5e4c881 authored by Sahil Sonar's avatar Sahil Sonar 💬
Browse files

SystemUI: Allow disabling fingerprint ripple on unlock

  - Our PowerVR GPU struggles to render ripple effect and
    in some cases freezes on unlocking screen,
    requiring force reboot. Let's disable it
    completely via an overlay.
parent e93b54fa
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) {