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

Commit 78c62980 authored by Steven Ross's avatar Steven Ross
Browse files

Don't show Face Unlock on initial boot fixes 6396685

Uses a static to keep track whether this is the first pass through the lockscreen
This will be true from when the process is instantiated until the lockscreen
is constructed for the first time, and then false afterwards.
When it is true, we suppress the biometric unlock (Face Unlock).
This avoids the problem of unpredictable and slow startup behavior for Face Unlock
on the first unlock after boot.

Change-Id: I70033af17ba3163d5fe07fc58096f01afaaaafd0
parent 6dbac379
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -117,6 +117,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
    private boolean mHasDialog = false;
    //True if this device is currently plugged in
    private boolean mPluggedIn;
    // True the first time lockscreen is showing after boot
    private static boolean sIsFirstAppearanceAfterBoot = true;

    // The music control widget
    private TransportControlView mTransportControlView;
@@ -437,7 +439,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
        mUpdateMonitor = updateMonitor;
        mLockPatternUtils = lockPatternUtils;
        mWindowController = controller;
        mSuppressBiometricUnlock = false;
        mSuppressBiometricUnlock = sIsFirstAppearanceAfterBoot;
        sIsFirstAppearanceAfterBoot = false;
        mPluggedIn = mUpdateMonitor.isDevicePluggedIn();
        mScreenOn = ((PowerManager)context.getSystemService(Context.POWER_SERVICE)).isScreenOn();