summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-01-16 19:55:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-01-16 19:55:26 +0000
commit46894e7ac25ed9c5cdd4a0d5234edbfdb4f21944 (patch)
tree9fe8c45c95931c4a81c5950e7dfd1bb04bcc9461 /core/java
parent922901849c3d6371da75b372d9ff8a216f89bf2c (diff)
parente4d655137af02bb0db506833e16ea7759493f2c9 (diff)
Merge "Update BiometricManager constants to be more clear"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/hardware/biometrics/BiometricManager.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/hardware/biometrics/BiometricManager.java b/core/java/android/hardware/biometrics/BiometricManager.java
index eb3414d2ca48..8aac1bfa1f8d 100644
--- a/core/java/android/hardware/biometrics/BiometricManager.java
+++ b/core/java/android/hardware/biometrics/BiometricManager.java
@@ -42,13 +42,13 @@ public class BiometricManager {
/**
* The hardware is unavailable. Try again later.
*/
- public static final int BIOMETRIC_ERROR_UNAVAILABLE =
+ public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE =
BiometricConstants.BIOMETRIC_ERROR_HW_UNAVAILABLE;
/**
* The user does not have any biometrics enrolled.
*/
- public static final int BIOMETRIC_ERROR_NO_BIOMETRICS =
+ public static final int BIOMETRIC_ERROR_NONE_ENROLLED =
BiometricConstants.BIOMETRIC_ERROR_NO_BIOMETRICS;
/**
@@ -58,8 +58,8 @@ public class BiometricManager {
BiometricConstants.BIOMETRIC_ERROR_HW_NOT_PRESENT;
@IntDef({BIOMETRIC_SUCCESS,
- BIOMETRIC_ERROR_UNAVAILABLE,
- BIOMETRIC_ERROR_NO_BIOMETRICS,
+ BIOMETRIC_ERROR_HW_UNAVAILABLE,
+ BIOMETRIC_ERROR_NONE_ENROLLED,
BIOMETRIC_ERROR_NO_HARDWARE})
@interface BiometricError {}
@@ -95,8 +95,8 @@ public class BiometricManager {
* Determine if biometrics can be used. In other words, determine if {@link BiometricPrompt}
* can be expected to be shown (hardware available, templates enrolled, user-enabled).
*
- * @return Returns {@link #BIOMETRIC_ERROR_NO_BIOMETRICS} if the user does not have any
- * enrolled, or {@link #BIOMETRIC_ERROR_UNAVAILABLE} if none are currently
+ * @return Returns {@link #BIOMETRIC_ERROR_NONE_ENROLLED} if the user does not have any
+ * enrolled, or {@link #BIOMETRIC_ERROR_HW_UNAVAILABLE} if none are currently
* supported/enabled. Returns {@link #BIOMETRIC_SUCCESS} if a biometric can currently be
* used (enrolled and available).
*/
@@ -113,7 +113,7 @@ public class BiometricManager {
return BIOMETRIC_ERROR_NO_HARDWARE;
} else {
Slog.w(TAG, "hasEnrolledBiometrics(): Service not connected");
- return BIOMETRIC_ERROR_UNAVAILABLE;
+ return BIOMETRIC_ERROR_HW_UNAVAILABLE;
}
}
}