@@ -421,8 +421,8 @@ private void reportFailedUnlockAttempt() {
421421 void showPrimarySecurityScreen (boolean turningOff ) {
422422 SecurityMode securityMode = mSecurityModel .getSecurityMode ();
423423 if (DEBUG ) Log .v (TAG , "showPrimarySecurityScreen(turningOff=" + turningOff + ")" );
424- if (!turningOff && KeyguardUpdateMonitor . getInstance ( mContext ). isAlternateUnlockEnabled ()
425- && ! KeyguardUpdateMonitor .getInstance (mContext ).getIsFirstBoot ()) {
424+ if (!turningOff &&
425+ KeyguardUpdateMonitor .getInstance (mContext ).isAlternateUnlockEnabled ()) {
426426 // If we're not turning off, then allow biometric alternate.
427427 // We'll reload it when the device comes back on.
428428 securityMode = mSecurityModel .getAlternateFor (securityMode );
@@ -498,7 +498,6 @@ private void showNextSecurityScreenOrFinish(boolean authenticated) {
498498 // If the alternate unlock was suppressed, it can now be safely
499499 // enabled because the user has left keyguard.
500500 KeyguardUpdateMonitor .getInstance (mContext ).setAlternateUnlockEnabled (true );
501- KeyguardUpdateMonitor .getInstance (mContext ).setIsFirstBoot (false );
502501
503502 // If there's a pending runnable because the user interacted with a widget
504503 // and we're leaving keyguard, then run it.
@@ -710,6 +709,9 @@ public void onScreenTurnedOn() {
710709 @ Override
711710 public void onScreenTurnedOff () {
712711 if (DEBUG ) Log .d (TAG , "screen off, instance " + Integer .toHexString (hashCode ()));
712+ // Once the screen turns off, we no longer consider this to be first boot and we want the
713+ // biometric unlock to start next time keyguard is shown.
714+ KeyguardUpdateMonitor .getInstance (mContext ).setAlternateUnlockEnabled (true );
713715 saveStickyWidgetIndex ();
714716 showPrimarySecurityScreen (true );
715717 getSecurityView (mCurrentSecuritySelection ).onPause ();
0 commit comments