File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
com/android/internal/widget Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -17614,6 +17614,7 @@ package android.provider {
1761417614 field public static final java.lang.String INPUT_METHOD_SELECTOR_VISIBILITY = "input_method_selector_visibility";
1761517615 field public static final java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
1761617616 field public static final java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
17617+ field public static final java.lang.String LOCK_BIOMETRIC_WEAK_FLAGS = "lock_biometric_weak_flags";
1761717618 field public static final java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
1761817619 field public static final java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
1761917620 field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
Original file line number Diff line number Diff line change @@ -793,6 +793,7 @@ public static final class System extends NameValueTable {
793793 MOVED_TO_SECURE .add (Secure .HTTP_PROXY );
794794 MOVED_TO_SECURE .add (Secure .INSTALL_NON_MARKET_APPS );
795795 MOVED_TO_SECURE .add (Secure .LOCATION_PROVIDERS_ALLOWED );
796+ MOVED_TO_SECURE .add (Secure .LOCK_BIOMETRIC_WEAK_FLAGS );
796797 MOVED_TO_SECURE .add (Secure .LOCK_PATTERN_ENABLED );
797798 MOVED_TO_SECURE .add (Secure .LOCK_PATTERN_VISIBLE );
798799 MOVED_TO_SECURE .add (Secure .LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED );
@@ -2656,6 +2657,13 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
26562657 */
26572658 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed" ;
26582659
2660+ /**
2661+ * A flag containing settings used for biometric weak
2662+ * @hide
2663+ */
2664+ public static final String LOCK_BIOMETRIC_WEAK_FLAGS =
2665+ "lock_biometric_weak_flags" ;
2666+
26592667 /**
26602668 * Whether autolock is enabled (0 = false, 1 = true)
26612669 */
Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ public class LockPatternUtils {
105105 */
106106 public static final int MIN_PATTERN_REGISTER_FAIL = MIN_LOCK_PATTERN_SIZE ;
107107
108+ /**
109+ * The bit in LOCK_BIOMETRIC_WEAK_FLAGS to be used to indicate whether liveliness should
110+ * be used
111+ */
112+ public static final int FLAG_BIOMETRIC_WEAK_LIVELINESS = 0x1 ;
113+
108114 private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently" ;
109115 private final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline" ;
110116 private final static String PATTERN_EVER_CHOSEN_KEY = "lockscreen.patterneverchosen" ;
@@ -877,6 +883,28 @@ public boolean isBiometricWeakInstalled() {
877883 return true ;
878884 }
879885
886+ /**
887+ * Set whether biometric weak liveliness is enabled.
888+ */
889+ public void setBiometricWeakLivelinessEnabled (boolean enabled ) {
890+ long currentFlag = getLong (Settings .Secure .LOCK_BIOMETRIC_WEAK_FLAGS , 0L );
891+ long newFlag ;
892+ if (enabled ) {
893+ newFlag = currentFlag | FLAG_BIOMETRIC_WEAK_LIVELINESS ;
894+ } else {
895+ newFlag = currentFlag & ~FLAG_BIOMETRIC_WEAK_LIVELINESS ;
896+ }
897+ setLong (Settings .Secure .LOCK_BIOMETRIC_WEAK_FLAGS , newFlag );
898+ }
899+
900+ /**
901+ * @return Whether the biometric weak liveliness is enabled.
902+ */
903+ public boolean isBiometricWeakLivelinessEnabled () {
904+ long currentFlag = getLong (Settings .Secure .LOCK_BIOMETRIC_WEAK_FLAGS , 0L );
905+ return ((currentFlag & FLAG_BIOMETRIC_WEAK_LIVELINESS ) != 0 );
906+ }
907+
880908 /**
881909 * Set whether the lock pattern is enabled.
882910 */
You can’t perform that action at this time.
0 commit comments