Fix 5185505: allow facelock to be enabled by a setting.

This allows face recognition to be enabled through Settings.Secure,
so we can test on selected devices.

Change-Id: I7f832cafd6a98f4289d618bc8924cd467706b778
This commit is contained in:
Jim Miller
2011-10-03 20:42:26 -07:00
parent fee5cb54af
commit cb3521e3bb

View File

@ -59,6 +59,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
*/
public class LockPatternUtils {
private static final String OPTION_ENABLE_FACELOCK = "enable_facelock";
private static final String TAG = "LockPatternUtils";
private static final String SYSTEM_DIRECTORY = "/system/";
@ -114,6 +116,7 @@ public class LockPatternUtils {
public static final String PASSWORD_TYPE_ALTERNATE_KEY = "lockscreen.password_type_alternate";
private final static String LOCK_PASSWORD_SALT_KEY = "lockscreen.password_salt";
private final static String DISABLE_LOCKSCREEN_KEY = "lockscreen.disabled";
private final static String LOCKSCREEN_OPTIONS = "lockscreen.options";
public final static String LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK
= "lockscreen.biometric_weak_fallback";
@ -839,7 +842,7 @@ public class LockPatternUtils {
*/
public boolean isBiometricWeakInstalled() {
// Check that the system flag was set
if (!SystemProperties.getBoolean("ro.lockscreen.facelock_enabled", false)) {
if (!OPTION_ENABLE_FACELOCK.equals(getString(LOCKSCREEN_OPTIONS))) {
return false;
}