Skip to content

Commit 7019325

Browse files
author
Brian Colonna
committed
Bug 6605167: Turning off FUL during error counts as attempt
If FUL was turned off while the error message was displayed it would not count as a failed attempt. This commit changes the reportFailedAttempt callback to just report the failure rather than report the failure and close. This allows the FUL service to send the reportFailedAttempt message earlier and then later close using the existing cancel function, which closes without reporting a failed attempt. Change-Id: Ib3b76f477a98b149fcccc32ac39ecaeccd88a7e2
1 parent ce4eead commit 7019325

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

policy/src/com/android/internal/policy/impl/FaceUnlock.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ void handleUnlock() {
375375
}
376376

377377
/**
378-
* Stops the Face Unlock service and exposes the backup lock. Called when the user presses the
379-
* cancel button to skip Face Unlock, no face is detected or there is an error.
378+
* Stops the Face Unlock service and exposes the backup lock.
380379
*/
381380
void handleCancel() {
382381
if (DEBUG) Log.d(TAG, "handleCancel()");
@@ -390,19 +389,11 @@ void handleCancel() {
390389
}
391390

392391
/**
393-
* Stops the Face Unlock service and exposes the backup lock, reporting a failed unlock attempt.
394-
* Called when Face Unlock denies access to the user.
392+
* Increments the number of failed Face Unlock attempts.
395393
*/
396394
void handleReportFailedAttempt() {
397395
if (DEBUG) Log.d(TAG, "handleReportFailedAttempt()");
398396
mUpdateMonitor.reportFailedBiometricUnlockAttempt();
399-
if (mFaceUnlockView != null) {
400-
mFaceUnlockView.setVisibility(View.INVISIBLE);
401-
} else {
402-
Log.e(TAG, "mFaceUnlockView is null in handleReportFailedAttempt()");
403-
}
404-
stop();
405-
mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT);
406397
}
407398

408399
/**
@@ -521,8 +512,7 @@ public void unlock() {
521512
}
522513

523514
/**
524-
* Called when the user presses cancel to skip Face Unlock, a face cannot be found or
525-
* there is an error.
515+
* Called when Face Unlock wants to go to the backup.
526516
*/
527517
@Override
528518
public void cancel() {
@@ -531,7 +521,7 @@ public void cancel() {
531521
}
532522

533523
/**
534-
* Called when Face Unlock denies access to the user.
524+
* Called when Face Unlock wants to increment the number of failed attempts.
535525
*/
536526
@Override
537527
public void reportFailedAttempt() {

0 commit comments

Comments
 (0)