summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDanielle Millett <dmillett@google.com>2011-09-30 13:55:07 -0400
committerDanielle Millett <dmillett@google.com>2011-10-03 18:41:01 -0400
commit58396984ef49080d5550919130fc0d869ccf840b (patch)
treea3a1c67a25a114408c7f10538d9ce3d5fe5ede1c /policy
parentc8f68e5c7ffef3bc6775edf39a251baf79b81f6b (diff)
downloadframeworks_base-58396984ef49080d5550919130fc0d869ccf840b.zip
frameworks_base-58396984ef49080d5550919130fc0d869ccf840b.tar.gz
frameworks_base-58396984ef49080d5550919130fc0d869ccf840b.tar.bz2
Reworked biometric weak check functions
Renamed isBiometricEnabled to isBiometricWeakInstalled. This function now checks if the system property is set, the facelock package is installed, and if the phone has a front facing camera. It no longer checks if facelock is currently set as the unlock method. Added isBiometricWeakInstalled checks to all cases where facelock is used in LockPatternKeyguardView Change-Id: Ia86a7ad6118101c6aab90ffb2ee9c42bf2548149
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index f970ff3..ca5d274 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -531,7 +531,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
((KeyguardScreen) mUnlockScreen).onResume();
}
- if (mLockPatternUtils.usingBiometricWeak()) {
+ if (mLockPatternUtils.usingBiometricWeak() &&
+ mLockPatternUtils.isBiometricWeakInstalled()) {
mHandler.sendEmptyMessage(MSG_SHOW_FACELOCK_AREA_VIEW);
} else {
mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW);
@@ -1014,7 +1015,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
// Binds to FaceLock service, but does not tell it to start
public void bindToFaceLock() {
- if (mLockPatternUtils.usingBiometricWeak()) {
+ if (mLockPatternUtils.usingBiometricWeak() &&
+ mLockPatternUtils.isBiometricWeakInstalled()) {
if (!mBoundToFaceLockService) {
if (DEBUG) Log.d(TAG, "before bind to FaceLock service");
mContext.bindService(new Intent(IFaceLockInterface.class.getName()),
@@ -1030,7 +1032,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
// Tells FaceLock to stop and then unbinds from the FaceLock service
public void stopAndUnbindFromFaceLock() {
- if (mLockPatternUtils.usingBiometricWeak()) {
+ if (mLockPatternUtils.usingBiometricWeak() &&
+ mLockPatternUtils.isBiometricWeakInstalled()) {
stopFaceLock();
if (mBoundToFaceLockService) {
@@ -1079,7 +1082,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
// Tells the FaceLock service to start displaying its UI and perform recognition
public void startFaceLock(IBinder windowToken, int x, int y, int h, int w)
{
- if (mLockPatternUtils.usingBiometricWeak()) {
+ if (mLockPatternUtils.usingBiometricWeak() &&
+ mLockPatternUtils.isBiometricWeakInstalled()) {
synchronized (mFaceLockServiceRunningLock) {
if (!mFaceLockServiceRunning) {
if (DEBUG) Log.d(TAG, "Starting FaceLock");
@@ -1099,7 +1103,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
// Tells the FaceLock service to stop displaying its UI and stop recognition
public void stopFaceLock()
{
- if (mLockPatternUtils.usingBiometricWeak()) {
+ if (mLockPatternUtils.usingBiometricWeak() &&
+ mLockPatternUtils.isBiometricWeakInstalled()) {
// Note that attempting to stop FaceLock when it's not running is not an issue.
// FaceLock can return, which stops it and then we try to stop it when the
// screen is turned off. That's why we check.