summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorKevin Chyn <kchyn@google.com>2020-02-06 16:27:41 -0800
committerKevin Chyn <kchyn@google.com>2020-02-10 15:06:27 -0800
commiteeadeaac028bdf4dc42fdba8ceeb9cc0c370d379 (patch)
tree10405c5ccc4bc8272e9d86c5c0e44fc4f7adaae0 /core/java/android
parent929de647969cf5efa1778fe4b54ee968bff4d613 (diff)
Add API constant for BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED
Bug: 148419762 Test: make -j Test: See next CL Change-Id: I3c272792fe2366239478aa3ad7bfbb8d9bbacf56
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/biometrics/BiometricConstants.java8
-rw-r--r--core/java/android/hardware/biometrics/BiometricFaceConstants.java10
-rw-r--r--core/java/android/hardware/biometrics/BiometricFingerprintConstants.java10
-rw-r--r--core/java/android/hardware/biometrics/BiometricManager.java12
4 files changed, 39 insertions, 1 deletions
diff --git a/core/java/android/hardware/biometrics/BiometricConstants.java b/core/java/android/hardware/biometrics/BiometricConstants.java
index 5a1365169eee..add67aa436c6 100644
--- a/core/java/android/hardware/biometrics/BiometricConstants.java
+++ b/core/java/android/hardware/biometrics/BiometricConstants.java
@@ -132,6 +132,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.
* @hide
diff --git a/core/java/android/hardware/biometrics/BiometricFaceConstants.java b/core/java/android/hardware/biometrics/BiometricFaceConstants.java
index bae0fd3ad3b9..6ba7c2a6e7e8 100644
--- a/core/java/android/hardware/biometrics/BiometricFaceConstants.java
+++ b/core/java/android/hardware/biometrics/BiometricFaceConstants.java
@@ -17,6 +17,7 @@
package android.hardware.biometrics;
import android.app.KeyguardManager;
+import android.hardware.biometrics.BiometricManager.Authenticators;
import android.hardware.face.FaceManager;
/**
@@ -142,6 +143,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
*/
public static final int FACE_ERROR_VENDOR_BASE = 1000;
diff --git a/core/java/android/hardware/biometrics/BiometricFingerprintConstants.java b/core/java/android/hardware/biometrics/BiometricFingerprintConstants.java
index 5c74456eb60a..0732d760daa9 100644
--- a/core/java/android/hardware/biometrics/BiometricFingerprintConstants.java
+++ b/core/java/android/hardware/biometrics/BiometricFingerprintConstants.java
@@ -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;
/**
@@ -128,6 +129,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
*/
@UnsupportedAppUsage
diff --git a/core/java/android/hardware/biometrics/BiometricManager.java b/core/java/android/hardware/biometrics/BiometricManager.java
index 125b676e14f7..7d66cae4c845 100644
--- a/core/java/android/hardware/biometrics/BiometricManager.java
+++ b/core/java/android/hardware/biometrics/BiometricManager.java
@@ -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 {}
/**