summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/policy/IFaceLockCallback.aidl1
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java34
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard_obsolete/FaceUnlock.java34
3 files changed, 26 insertions, 43 deletions
diff --git a/core/java/com/android/internal/policy/IFaceLockCallback.aidl b/core/java/com/android/internal/policy/IFaceLockCallback.aidl
index eb902fd..280e4d5 100644
--- a/core/java/com/android/internal/policy/IFaceLockCallback.aidl
+++ b/core/java/com/android/internal/policy/IFaceLockCallback.aidl
@@ -22,6 +22,5 @@ oneway interface IFaceLockCallback {
void unlock();
void cancel();
void reportFailedAttempt();
- void exposeFallback();
void pokeWakelock(int millis);
}
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
index faf0ca0..9858c77 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
@@ -57,8 +57,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
private final int MSG_UNLOCK = 2;
private final int MSG_CANCEL = 3;
private final int MSG_REPORT_FAILED_ATTEMPT = 4;
- private final int MSG_EXPOSE_FALLBACK = 5;
- private final int MSG_POKE_WAKELOCK = 6;
+ private final int MSG_POKE_WAKELOCK = 5;
// TODO: This was added for the purpose of adhering to what the biometric interface expects
// the isRunning() function to return. However, it is probably not necessary to have both
@@ -220,9 +219,6 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
case MSG_REPORT_FAILED_ATTEMPT:
handleReportFailedAttempt();
break;
- case MSG_EXPOSE_FALLBACK:
- handleExposeFallback();
- break;
case MSG_POKE_WAKELOCK:
handlePokeWakelock(msg.arg1);
break;
@@ -310,6 +306,10 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
*/
void handleCancel() {
if (DEBUG) Log.d(TAG, "handleCancel()");
+ // We are going to the backup method, so we don't want to see Face Unlock again until the
+ // next time the user visits keyguard.
+ KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(false);
+
mKeyguardScreenCallback.showBackupSecurity();
stop();
mKeyguardScreenCallback.userActivity(BACKUP_LOCK_TIMEOUT);
@@ -320,17 +320,11 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
*/
void handleReportFailedAttempt() {
if (DEBUG) Log.d(TAG, "handleReportFailedAttempt()");
- mKeyguardScreenCallback.reportFailedUnlockAttempt();
- }
+ // We are going to the backup method, so we don't want to see Face Unlock again until the
+ // next time the user visits keyguard.
+ KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(false);
- /**
- * Hides the Face Unlock view to expose the backup lock. Called when the Face Unlock service UI
- * is started, indicating there is no need to continue displaying the underlying view because
- * the service UI is now covering the backup lock.
- */
- void handleExposeFallback() {
- if (DEBUG) Log.d(TAG, "handleExposeFallback()");
- // No longer required because face unlock doesn't cover backup unlock.
+ mKeyguardScreenCallback.reportFailedUnlockAttempt();
}
/**
@@ -443,16 +437,6 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
}
/**
- * Called when the Face Unlock service starts displaying the UI, indicating that the backup
- * unlock can be exposed because the Face Unlock service is now covering the backup with its
- * UI.
- */
- public void exposeFallback() {
- if (DEBUG) Log.d(TAG, "exposeFallback()");
- mHandler.sendEmptyMessage(MSG_EXPOSE_FALLBACK);
- }
-
- /**
* Called when Face Unlock wants to keep the screen alive and active for a specific amount
* of time.
*/
diff --git a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/FaceUnlock.java
index e4d9215..e4768e2 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/FaceUnlock.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/FaceUnlock.java
@@ -61,7 +61,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
private final int MSG_UNLOCK = 4;
private final int MSG_CANCEL = 5;
private final int MSG_REPORT_FAILED_ATTEMPT = 6;
- private final int MSG_EXPOSE_FALLBACK = 7;
+ //private final int MSG_EXPOSE_FALLBACK = 7;
private final int MSG_POKE_WAKELOCK = 8;
// TODO: This was added for the purpose of adhering to what the biometric interface expects
@@ -258,9 +258,9 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
case MSG_REPORT_FAILED_ATTEMPT:
handleReportFailedAttempt();
break;
- case MSG_EXPOSE_FALLBACK:
- handleExposeFallback();
- break;
+ //case MSG_EXPOSE_FALLBACK:
+ //handleExposeFallback();
+ //break;
case MSG_POKE_WAKELOCK:
handlePokeWakelock(msg.arg1);
break;
@@ -401,14 +401,14 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
* is started, indicating there is no need to continue displaying the underlying view because
* the service UI is now covering the backup lock.
*/
- void handleExposeFallback() {
- if (DEBUG) Log.d(TAG, "handleExposeFallback()");
- if (mFaceUnlockView != null) {
- mFaceUnlockView.setVisibility(View.INVISIBLE);
- } else {
- Log.e(TAG, "mFaceUnlockView is null in handleExposeFallback()");
- }
- }
+ //void handleExposeFallback() {
+ // if (DEBUG) Log.d(TAG, "handleExposeFallback()");
+ // if (mFaceUnlockView != null) {
+ // mFaceUnlockView.setVisibility(View.INVISIBLE);
+ // } else {
+ // Log.e(TAG, "mFaceUnlockView is null in handleExposeFallback()");
+ // }
+ //}
/**
* Pokes the wakelock to keep the screen alive and active for a specific amount of time.
@@ -534,11 +534,11 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
* unlock can be exposed because the Face Unlock service is now covering the backup with its
* UI.
**/
- @Override
- public void exposeFallback() {
- if (DEBUG) Log.d(TAG, "exposeFallback()");
- mHandler.sendEmptyMessage(MSG_EXPOSE_FALLBACK);
- }
+ //@Override
+ //public void exposeFallback() {
+ // if (DEBUG) Log.d(TAG, "exposeFallback()");
+ // mHandler.sendEmptyMessage(MSG_EXPOSE_FALLBACK);
+ //}
/**
* Called when Face Unlock wants to keep the screen alive and active for a specific amount