@@ -57,8 +57,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
5757 private final int MSG_UNLOCK = 2 ;
5858 private final int MSG_CANCEL = 3 ;
5959 private final int MSG_REPORT_FAILED_ATTEMPT = 4 ;
60- private final int MSG_EXPOSE_FALLBACK = 5 ;
61- private final int MSG_POKE_WAKELOCK = 6 ;
60+ private final int MSG_POKE_WAKELOCK = 5 ;
6261
6362 // TODO: This was added for the purpose of adhering to what the biometric interface expects
6463 // the isRunning() function to return. However, it is probably not necessary to have both
@@ -220,9 +219,6 @@ public boolean handleMessage(Message msg) {
220219 case MSG_REPORT_FAILED_ATTEMPT :
221220 handleReportFailedAttempt ();
222221 break ;
223- case MSG_EXPOSE_FALLBACK :
224- handleExposeFallback ();
225- break ;
226222 case MSG_POKE_WAKELOCK :
227223 handlePokeWakelock (msg .arg1 );
228224 break ;
@@ -310,6 +306,10 @@ void handleUnlock() {
310306 */
311307 void handleCancel () {
312308 if (DEBUG ) Log .d (TAG , "handleCancel()" );
309+ // We are going to the backup method, so we don't want to see Face Unlock again until the
310+ // next time the user visits keyguard.
311+ KeyguardUpdateMonitor .getInstance (mContext ).setAlternateUnlockEnabled (false );
312+
313313 mKeyguardScreenCallback .showBackupSecurity ();
314314 stop ();
315315 mKeyguardScreenCallback .userActivity (BACKUP_LOCK_TIMEOUT );
@@ -320,17 +320,11 @@ void handleCancel() {
320320 */
321321 void handleReportFailedAttempt () {
322322 if (DEBUG ) Log .d (TAG , "handleReportFailedAttempt()" );
323- mKeyguardScreenCallback .reportFailedUnlockAttempt ();
324- }
323+ // We are going to the backup method, so we don't want to see Face Unlock again until the
324+ // next time the user visits keyguard.
325+ KeyguardUpdateMonitor .getInstance (mContext ).setAlternateUnlockEnabled (false );
325326
326- /**
327- * Hides the Face Unlock view to expose the backup lock. Called when the Face Unlock service UI
328- * is started, indicating there is no need to continue displaying the underlying view because
329- * the service UI is now covering the backup lock.
330- */
331- void handleExposeFallback () {
332- if (DEBUG ) Log .d (TAG , "handleExposeFallback()" );
333- // No longer required because face unlock doesn't cover backup unlock.
327+ mKeyguardScreenCallback .reportFailedUnlockAttempt ();
334328 }
335329
336330 /**
@@ -442,16 +436,6 @@ public void reportFailedAttempt() {
442436 mHandler .sendEmptyMessage (MSG_REPORT_FAILED_ATTEMPT );
443437 }
444438
445- /**
446- * Called when the Face Unlock service starts displaying the UI, indicating that the backup
447- * unlock can be exposed because the Face Unlock service is now covering the backup with its
448- * UI.
449- */
450- public void exposeFallback () {
451- if (DEBUG ) Log .d (TAG , "exposeFallback()" );
452- mHandler .sendEmptyMessage (MSG_EXPOSE_FALLBACK );
453- }
454-
455439 /**
456440 * Called when Face Unlock wants to keep the screen alive and active for a specific amount
457441 * of time.
0 commit comments