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

Commit 5c7ed9af authored by Haining Chen's avatar Haining Chen Committed by Kevin Chyn
Browse files

Add phenotype namespace and flag for biometrics

This allows the ability to enforce biometric modality strength (downgrade only) on certain devices.

Bug: 141025588

Test: atest com.android.server.biometrics
Test: make system-api-stubs-docs-update-current-api
Test: make test-api-stubs-docs-update-current-api
Test: manual testing using "adb shell device_config put NAMESPACE KEY VALUE"

Change-Id: Ib167a038d717216ec0a54d6f4f6f5f88a70e1a6e
parent 30f1dd8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6899,6 +6899,7 @@ package android.provider {
    field public static final String NAMESPACE_APP_COMPAT = "app_compat";
    field public static final String NAMESPACE_ATTENTION_MANAGER_SERVICE = "attention_manager_service";
    field public static final String NAMESPACE_AUTOFILL = "autofill";
    field public static final String NAMESPACE_BIOMETRICS = "biometrics";
    field public static final String NAMESPACE_CONNECTIVITY = "connectivity";
    field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture";
    field @Deprecated public static final String NAMESPACE_DEX_BOOT = "dex_boot";
+1 −0
Original line number Diff line number Diff line
@@ -2429,6 +2429,7 @@ package android.provider {
    method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setProperty(@NonNull String, @NonNull String, @Nullable String, boolean);
    field public static final String NAMESPACE_ANDROID = "android";
    field public static final String NAMESPACE_AUTOFILL = "autofill";
    field public static final String NAMESPACE_BIOMETRICS = "biometrics";
    field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture";
    field public static final String NAMESPACE_PERMISSIONS = "permissions";
    field public static final String NAMESPACE_PRIVACY = "privacy";
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ interface IBiometricService {
    // Registers an authenticator (e.g. face, fingerprint, iris).
    // Id must be unique, whereas strength and modality don't need to be.
    // TODO(b/123321528): Turn strength and modality into enums.
    void registerAuthenticator(int id, int strength, int modality,
    void registerAuthenticator(int id, int modality, int strength,
            IBiometricAuthenticator authenticator);

    // Register callback for when keyguard biometric eligibility changes.
+9 −0
Original line number Diff line number Diff line
@@ -348,6 +348,15 @@ public final class DeviceConfig {
    @TestApi
    public static final String NAMESPACE_PRIVACY = "privacy";

    /**
     * Namespace for biometrics related features
     *
     * @hide
     */
    @SystemApi
    @TestApi
    public static final String NAMESPACE_BIOMETRICS = "biometrics";

    /**
     * Permission related properties definitions.
     *
+8 −0
Original line number Diff line number Diff line
@@ -4100,6 +4100,14 @@
    <!-- Which binder services to include in incident reports containing restricted images. -->
    <string-array name="config_restrictedImagesServices" translatable="false"/>

    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
         when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
         where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
         and Strength as defined in Authenticators.java -->
    <string-array name="config_biometric_sensors" translatable="false" >
        <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
    </string-array>

    <!-- Messages that should not be shown to the user during face auth enrollment. This should be
         used to hide messages that may be too chatty or messages that the user can't do much about.
         Entries are defined in android.hardware.biometrics.face@1.0 types.hal -->
Loading