Skip to content

Commit a6314da

Browse files
Brian ColonnaAndroid (Google) Code Review
authored andcommitted
Merge "FUL being unsuppressed when screen turns off fixes b/7453702" into jb-mr1-lockscreen-dev
2 parents c4842c1 + 078f591 commit a6314da

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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();

policy/src/com/android/internal/policy/impl/keyguard/KeyguardUpdateMonitor.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ public void onReceive(Context context, Intent intent) {
200200
}
201201
}
202202
};
203-
private boolean mIsFirstBoot;
204203

205204
/**
206205
* When we receive a
@@ -778,12 +777,4 @@ public static boolean isSimPinSecure(IccCardConstants.State state) {
778777
|| simState == IccCardConstants.State.PUK_REQUIRED
779778
|| simState == IccCardConstants.State.PERM_DISABLED);
780779
}
781-
782-
public void setIsFirstBoot(boolean b) {
783-
mIsFirstBoot = b;
784-
}
785-
786-
public boolean getIsFirstBoot() {
787-
return mIsFirstBoot;
788-
}
789780
}

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ public void onSystemReady() {
522522

523523
// Disable alternate unlock right after boot until things have settled.
524524
mUpdateMonitor.setAlternateUnlockEnabled(false);
525-
mUpdateMonitor.setIsFirstBoot(true);
526525

527526
doKeyguardLocked();
528527
}

0 commit comments

Comments
 (0)