summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java10
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java31
2 files changed, 1 insertions, 40 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
index faecaed..50377c3 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -199,7 +199,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
break;
// These don't have timeout dialogs.
case Account:
- case Biometric:
case Invalid:
case None:
case SimPin:
@@ -379,7 +378,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
case Password:
case PIN:
case Account:
- case Biometric:
finish = true;
break;
@@ -492,11 +490,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
monitor.clearFailedUnlockAttempts();
mLockPatternUtils.reportSuccessfulPasswordAttempt();
} else {
- if (mCurrentSecuritySelection == SecurityMode.Biometric) {
- monitor.reportFailedBiometricUnlockAttempt();
- } else {
- KeyguardSecurityContainer.this.reportFailedUnlockAttempt();
- }
+ KeyguardSecurityContainer.this.reportFailedUnlockAttempt();
}
}
@@ -528,7 +522,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
case Pattern: return R.id.keyguard_pattern_view;
case PIN: return R.id.keyguard_pin_view;
case Password: return R.id.keyguard_password_view;
- case Biometric: return R.id.keyguard_face_unlock_view;
case Account: return R.id.keyguard_account_view;
case SimPin: return R.id.keyguard_sim_pin_view;
case SimPuk: return R.id.keyguard_sim_puk_view;
@@ -541,7 +534,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
case Pattern: return R.layout.keyguard_pattern_view;
case PIN: return R.layout.keyguard_pin_view;
case Password: return R.layout.keyguard_password_view;
- case Biometric: return R.layout.keyguard_face_unlock_view;
case Account: return R.layout.keyguard_account_view;
case SimPin: return R.layout.keyguard_sim_pin_view;
case SimPuk: return R.layout.keyguard_sim_puk_view;
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
index 1e2a233..adf8dd2 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
@@ -38,7 +38,6 @@ public class KeyguardSecurityModel {
Pattern, // Unlock by drawing a pattern.
Password, // Unlock by entering an alphanumeric password
PIN, // Strictly numeric password
- Biometric, // Unlock with a biometric key (e.g. finger print or face unlock)
Account, // Unlock by entering an account's login and password.
SimPin, // Unlock by entering a sim pin.
SimPuk // Unlock by entering a sim puk
@@ -56,28 +55,6 @@ public class KeyguardSecurityModel {
mLockPatternUtils = utils;
}
- /**
- * Returns true if biometric unlock is installed and selected. If this returns false there is
- * no need to even construct the biometric unlock.
- */
- boolean isBiometricUnlockEnabled() {
- return mLockPatternUtils.usingBiometricWeak()
- && mLockPatternUtils.isBiometricWeakInstalled();
- }
-
- /**
- * Returns true if a condition is currently suppressing the biometric unlock. If this returns
- * true there is no need to even construct the biometric unlock.
- */
- private boolean isBiometricUnlockSuppressed() {
- KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- final boolean backupIsTimedOut = monitor.getFailedUnlockAttempts() >=
- LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
- return monitor.getMaxBiometricUnlockAttemptsReached() || backupIsTimedOut
- || !monitor.isAlternateUnlockEnabled()
- || monitor.getPhoneState() != TelephonyManager.CALL_STATE_IDLE;
- }
-
SecurityMode getSecurityMode() {
KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
SecurityMode mode = SecurityMode.None;
@@ -127,12 +104,6 @@ public class KeyguardSecurityModel {
* @return alternate or the given mode
*/
SecurityMode getAlternateFor(SecurityMode mode) {
- if (isBiometricUnlockEnabled() && !isBiometricUnlockSuppressed()
- && (mode == SecurityMode.Password
- || mode == SecurityMode.PIN
- || mode == SecurityMode.Pattern)) {
- return SecurityMode.Biometric;
- }
return mode; // no alternate, return what was given
}
@@ -144,8 +115,6 @@ public class KeyguardSecurityModel {
*/
SecurityMode getBackupSecurityMode(SecurityMode mode) {
switch(mode) {
- case Biometric:
- return getSecurityMode();
case Pattern:
return SecurityMode.Account;
}