Enum BiometricError
- All Implemented Interfaces:
Comparable<BiometricError>
Typed error codes returned by
Biometrics and SecureStorage when an
asynchronous operation fails. Callers branch on these codes via
BiometricException.getError() instead of string-matching error messages,
which makes localization and recovery logic straightforward.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAuthentication completed but the user was not recognized.A previously-storedSecureStorageentry can no longer be decrypted because the user enrolled new biometrics or disabled device security since the entry was written.Too many failed attempts; biometric prompt is temporarily disabled.Biometric hardware is not present, or is disabled by policy.Hardware is present but the user has not enrolled any biometrics.The device has no passcode / PIN / pattern configured.Too many failed attempts and the user must unlock with their device passcode or PIN before biometrics can be used again.The OS cancelled the prompt (app backgrounded, system pre-empted, etc.).Anything not covered by the more specific codes.The user explicitly cancelled the prompt. -
Method Summary
Modifier and TypeMethodDescriptionstatic BiometricErrorReturns the enum constant of this type with the specified name.static BiometricError[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
NOT_AVAILABLE
Biometric hardware is not present, or is disabled by policy. -
NOT_ENROLLED
Hardware is present but the user has not enrolled any biometrics. -
LOCKED_OUT
Too many failed attempts; biometric prompt is temporarily disabled. -
PERMANENTLY_LOCKED_OUT
Too many failed attempts and the user must unlock with their device passcode or PIN before biometrics can be used again. -
PASSCODE_NOT_SET
The device has no passcode / PIN / pattern configured. -
USER_CANCELED
The user explicitly cancelled the prompt. -
SYSTEM_CANCELED
The OS cancelled the prompt (app backgrounded, system pre-empted, etc.). -
AUTHENTICATION_FAILED
Authentication completed but the user was not recognized. -
KEY_REVOKED
A previously-storedSecureStorageentry can no longer be decrypted because the user enrolled new biometrics or disabled device security since the entry was written. Callers must re-prompt and re-write the entry. -
UNKNOWN
Anything not covered by the more specific codes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-