Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e07dafc authored by Grace Cheng's avatar Grace Cheng
Browse files

Implement SFPS “require screen on to auth”

Creates new setting on SFPS to require screen on before unlocking a
device. Also sets up toggles for this setting at the end of fingerprint
enrollment and on the fingerprint settings page, and adds test to verify
expected behavior.

Test: atest KeyguardUpdateMonitorTest#testStartsListeningForSfps_whenKeyguardIsVisible_ifRequireScreenOnToAuthEnabled
Fixes: 249169615
Fixes: 245343077
Fixes: 248530806
Change-Id: Ibc55dfa6667ec281add11a2665fceb073974ccb0
parent 0b55b6f3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9858,6 +9858,13 @@ public final class Settings {
        public static final String FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME =
                "fingerprint_side_fps_auth_downtime";
        /**
         * Whether or not a SFPS device is required to be interactive for auth to unlock the device.
         * @hide
         */
        public static final String SFPS_REQUIRE_SCREEN_ON_TO_AUTH_ENABLED =
                "sfps_require_screen_on_to_auth_enabled";
        /**
         * Whether or not debugging is enabled.
         * @hide
+5 −0
Original line number Diff line number Diff line
@@ -4945,6 +4945,11 @@
    <!-- If face auth sends the user directly to home/last open app, or stays on keyguard -->
    <bool name="config_faceAuthDismissesKeyguard">true</bool>

    <!-- Default value for whether a SFPS device is required to be
        {@link KeyguardUpdateMonitor#isDeviceInteractive()} for fingerprint auth
        to unlock the device. -->
    <bool name="config_requireScreenOnToAuthEnabled">false</bool>

    <!-- The component name for the default profile supervisor, which can be set as a profile owner
    even after user setup is complete. The defined component should be used for supervision purposes
    only. The component must be part of a system app. -->
+1 −0
Original line number Diff line number Diff line
@@ -2725,6 +2725,7 @@
  <java-symbol type="array" name="config_face_acquire_vendor_biometricprompt_ignorelist" />
  <java-symbol type="bool" name="config_faceAuthSupportsSelfIllumination" />
  <java-symbol type="bool" name="config_faceAuthDismissesKeyguard" />
  <java-symbol type="bool" name="config_requireScreenOnToAuthEnabled" />

  <!-- Face config -->
  <java-symbol type="integer" name="config_faceMaxTemplatesPerUser" />
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ public class SecureSettings {
        Settings.Secure.FINGERPRINT_SIDE_FPS_BP_POWER_WINDOW,
        Settings.Secure.FINGERPRINT_SIDE_FPS_ENROLL_TAP_WINDOW,
        Settings.Secure.FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME,
        Settings.Secure.SFPS_REQUIRE_SCREEN_ON_TO_AUTH_ENABLED,
        Settings.Secure.ACTIVE_UNLOCK_ON_WAKE,
        Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT,
        Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL,
+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.FINGERPRINT_SIDE_FPS_ENROLL_TAP_WINDOW,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.SFPS_REQUIRE_SCREEN_ON_TO_AUTH_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SHOW_MEDIA_WHEN_BYPASSING, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.FACE_UNLOCK_APP_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, BOOLEAN_VALIDATOR);
Loading