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

Commit bf23b865 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge changes from topic "biometric-security"

* changes:
  Implementation for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
  Add API constant for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
parents fd0aa56f 98e9225f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -17033,6 +17033,7 @@ package android.hardware.biometrics {
    field public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE = 1; // 0x1
    field public static final int BIOMETRIC_ERROR_NONE_ENROLLED = 11; // 0xb
    field public static final int BIOMETRIC_ERROR_NO_HARDWARE = 12; // 0xc
    field public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
    field public static final int BIOMETRIC_SUCCESS = 0; // 0x0
  }
@@ -17067,6 +17068,7 @@ package android.hardware.biometrics {
    field public static final int BIOMETRIC_ERROR_NO_BIOMETRICS = 11; // 0xb
    field public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14; // 0xe
    field public static final int BIOMETRIC_ERROR_NO_SPACE = 4; // 0x4
    field public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
    field public static final int BIOMETRIC_ERROR_TIMEOUT = 3; // 0x3
    field public static final int BIOMETRIC_ERROR_UNABLE_TO_PROCESS = 2; // 0x2
    field public static final int BIOMETRIC_ERROR_USER_CANCELED = 10; // 0xa
+8 −0
Original line number Diff line number Diff line
@@ -131,6 +131,14 @@ public interface BiometricConstants {
     */
    int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * A security vulnerability has been discovered and the sensor is unavailable until a
     * security update has addressed this issue. This error can be received if for example,
     * authentication was requested with {@link Authenticators#BIOMETRIC_STRONG}, but the
     * sensor's strength can currently only meet {@link Authenticators#BIOMETRIC_WEAK}.
     */
    int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;

    /**
     * This constant is only used by SystemUI. It notifies SystemUI that authentication was paused
     * because the authentication attempt was unsuccessful.
+10 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.biometrics;

import android.app.KeyguardManager;
import android.hardware.biometrics.BiometricManager.Authenticators;
import android.hardware.face.FaceManager;

/**
@@ -141,6 +142,15 @@ public interface BiometricFaceConstants {
     */
    public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * A security vulnerability has been discovered and the sensor is unavailable until a
     * security update has addressed this issue. This error can be received if for example,
     * authentication was requested with {@link Authenticators#BIOMETRIC_STRONG}, but the
     * sensor's strength can currently only meet {@link Authenticators#BIOMETRIC_WEAK}.
     * @hide
     */
    int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;

    /**
     * @hide
     */
+10 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.hardware.biometrics;

import android.app.KeyguardManager;
import android.compat.annotation.UnsupportedAppUsage;
import android.hardware.biometrics.BiometricManager.Authenticators;
import android.hardware.fingerprint.FingerprintManager;

/**
@@ -127,6 +128,15 @@ public interface BiometricFingerprintConstants {
     */
    public static final int BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL = 14;

    /**
     * A security vulnerability has been discovered and the sensor is unavailable until a
     * security update has addressed this issue. This error can be received if for example,
     * authentication was requested with {@link Authenticators#BIOMETRIC_STRONG}, but the
     * sensor's strength can currently only meet {@link Authenticators#BIOMETRIC_WEAK}.
     * @hide
     */
    public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;

    /**
     * @hide
     */
+11 −1
Original line number Diff line number Diff line
@@ -61,10 +61,20 @@ public class BiometricManager {
    public static final int BIOMETRIC_ERROR_NO_HARDWARE =
            BiometricConstants.BIOMETRIC_ERROR_HW_NOT_PRESENT;

    /**
     * A security vulnerability has been discovered and the sensor is unavailable until a
     * security update has addressed this issue. This error can be received if for example,
     * authentication was requested with {@link Authenticators#BIOMETRIC_STRONG}, but the
     * sensor's strength can currently only meet {@link Authenticators#BIOMETRIC_WEAK}.
     */
    public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED =
            BiometricConstants.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED;

    @IntDef({BIOMETRIC_SUCCESS,
            BIOMETRIC_ERROR_HW_UNAVAILABLE,
            BIOMETRIC_ERROR_NONE_ENROLLED,
            BIOMETRIC_ERROR_NO_HARDWARE})
            BIOMETRIC_ERROR_NO_HARDWARE,
            BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED})
    @interface BiometricError {}

    /**
Loading