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

Commit 18283d24 authored by Tommy Nordgren's avatar Tommy Nordgren Committed by Beverly Tai
Browse files

Hide keyguard at notifyBiometricAuthModeChanged to avoid flickering

When fingerprint sensor is located on power button the keyguard is
shown a short while before home screen when unlocking with fingerprint.

This only happens when all lock screen settings in "When to show"
are disabled. The reason is that updateIsKeyguard is not called
when all settings in "When to show" are disabled.

The solution is to call updateIsKeyguard already at
notifyBiometricAuthModeChanged.

Flag: com.android.systemui.update_keyguard_on_wake_and_unlock_earlier
Test: atest CentralSurfacesImplTest
Bug: 441381838
Change-Id: I2014cccb61a02faa0dce0487ed0b3355e138f2e5
parent 8136c6cf
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2256,3 +2256,13 @@ flag {
    description: "Enable plugin for ambient cue project"
    bug: "439907833"
}

flag {
   name: "update_keyguard_on_wake_and_unlock_earlier"
   namespace: "systemui"
   description: "Call updateIsKeyguard earlier than on the dozing callback."
   bug: "441261701"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}
 No newline at end of file
+12 −4
Original line number Diff line number Diff line
@@ -2756,6 +2756,12 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {

    @Override
    public void notifyBiometricAuthModeChanged() {
        if (Flags.updateKeyguardOnWakeAndUnlockEarlier()) {
            if (mBiometricUnlockController.isWakeAndUnlock()) {
                // If we're wake and unlocking we should hide the keyguard ASAP if necessary.
                updateIsKeyguard();
            }
        }
        mDozeServiceHost.updateDozing();
        if (mBiometricUnlockController.getMode()
                == BiometricUnlockController.MODE_DISMISS_BOUNCER) {
@@ -3152,11 +3158,13 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
                    mDozeServiceHost.updateDozing();
                    updateScrimController();

                    if (!Flags.updateKeyguardOnWakeAndUnlockEarlier()) {
                        if (mBiometricUnlockController.isWakeAndUnlock()) {
                        // Usually doze changes are to/from lockscreen/AOD, but if we're wake and
                        // unlocking we should hide the keyguard ASAP if necessary.
                            // Usually doze changes are to/from lockscreen/AOD, but if we're wake
                            // and unlocking we should hide the keyguard ASAP if necessary.
                            updateIsKeyguard();
                        }
                    }

                    updateReportRejectedTouchVisibility();
                    Trace.endSection();