Skip to content

Commit ad7310f

Browse files
author
Selim Cinek
committed
Fixed wake to unlock when the device has never been unlocked
Previously the fingerprint could still unlock the device when waking up with the fingerprint sensor, since we were not checking if it is allowed. Bug: 22622999 Change-Id: I039a4e0701c1f161f227cf6f1d25e8147548db47
1 parent 1fcafc4 commit ad7310f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,15 +460,20 @@ public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simS
460460

461461
@Override
462462
public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) {
463+
boolean unlockingWithFingerprintAllowed =
464+
mUpdateMonitor.isUnlockingWithFingerprintAllowed();
463465
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
464-
if (mUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
466+
if (unlockingWithFingerprintAllowed) {
465467
mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
466468
}
467469
} else {
468-
if (wakeAndUnlocking) {
470+
if (wakeAndUnlocking && unlockingWithFingerprintAllowed) {
469471
mWakeAndUnlocking = true;
470472
keyguardDone(true, true);
471473
} else {
474+
if (wakeAndUnlocking) {
475+
mStatusBarKeyguardViewManager.notifyScreenWakeUpRequested();
476+
}
472477
mStatusBarKeyguardViewManager.animateCollapsePanels(
473478
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
474479
}

0 commit comments

Comments
 (0)