From a0ee004abf1e8988ece2d19ff5a3bef333763c9b Mon Sep 17 00:00:00 2001 From: Brian Colonna Date: Wed, 16 Jul 2014 13:50:47 -0400 Subject: [PATCH] Bug 16152902: Disabling FUL in keyguard and screen lock settings This is the framework change needed to switch from Face Unlock as a standard unlock mechanism to Face Unlock as a trustlet. This forces isBiometricWeakInstalled() to return false such that neither keyguard nor Screen Lock Settings thinks it exists. This means FUL is no longer a screen lock option. If Face Unlock was already enabled and someone updates to this build, the screen lock automatically switches to the backup lock. That functionality was already built-in so everything would continue to work if Face Unlock decided to disappear from someone's device. Change-Id: I407f6e1d75bfe40c7142c2508c2d68867e02d858 --- .../com/android/internal/widget/LockPatternUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index f40b84c6c4e1a..cc481e1204c1c 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -57,6 +57,7 @@ import java.util.List; public class LockPatternUtils { private static final String TAG = "LockPatternUtils"; + private static final boolean DEBUG = false; /** * The maximum number of incorrect attempts before the user is prevented @@ -1046,8 +1047,11 @@ public class LockPatternUtils { return false; } - - return true; + // TODO: If we decide not to proceed with Face Unlock as a trustlet, this must be changed + // back to returning true. If we become certain that Face Unlock will be a trustlet, this + // entire function and a lot of other code can be removed. + if (DEBUG) Log.d(TAG, "Forcing isBiometricWeakInstalled() to return false to disable it"); + return false; } /**