From a8bc97cd70e6ccc25b1117a49e9bebf958fd5e06 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 23 Aug 2017 18:00:03 -0700 Subject: [PATCH] Add a constant to allow system-provided fingerprint dialogs This adds FINGERPRINT_ERROR_USER_CANCELED to the list of possible errors returned by FingerprintManager.authenticate(). Fixes b/64540509 Test: documentation builds Change-Id: I66b46d385ab10eb0bc8e982c06e7a60570a79165 --- api/current.txt | 1 + api/system-current.txt | 1 + api/test-current.txt | 1 + .../android/hardware/fingerprint/FingerprintManager.java | 7 +++++++ 4 files changed, 10 insertions(+) diff --git a/api/current.txt b/api/current.txt index 24ab586424337..c9ccc955d10a9 100644 --- a/api/current.txt +++ b/api/current.txt @@ -15863,6 +15863,7 @@ package android.hardware.fingerprint { field public static final int FINGERPRINT_ERROR_NO_SPACE = 4; // 0x4 field public static final int FINGERPRINT_ERROR_TIMEOUT = 3; // 0x3 field public static final int FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2; // 0x2 + field public static final int FINGERPRINT_ERROR_USER_CANCELED = 10; // 0xa field public static final int FINGERPRINT_ERROR_VENDOR = 8; // 0x8 } diff --git a/api/system-current.txt b/api/system-current.txt index 99632688e2391..397c6002044f7 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -16613,6 +16613,7 @@ package android.hardware.fingerprint { field public static final int FINGERPRINT_ERROR_NO_SPACE = 4; // 0x4 field public static final int FINGERPRINT_ERROR_TIMEOUT = 3; // 0x3 field public static final int FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2; // 0x2 + field public static final int FINGERPRINT_ERROR_USER_CANCELED = 10; // 0xa field public static final int FINGERPRINT_ERROR_VENDOR = 8; // 0x8 } diff --git a/api/test-current.txt b/api/test-current.txt index 343228a87848b..19c9558de5f02 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -15949,6 +15949,7 @@ package android.hardware.fingerprint { field public static final int FINGERPRINT_ERROR_NO_SPACE = 4; // 0x4 field public static final int FINGERPRINT_ERROR_TIMEOUT = 3; // 0x3 field public static final int FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2; // 0x2 + field public static final int FINGERPRINT_ERROR_USER_CANCELED = 10; // 0xa field public static final int FINGERPRINT_ERROR_VENDOR = 8; // 0x8 } diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java index 8b6f9c1bbdd2e..987718a82c47a 100644 --- a/core/java/android/hardware/fingerprint/FingerprintManager.java +++ b/core/java/android/hardware/fingerprint/FingerprintManager.java @@ -127,6 +127,13 @@ public class FingerprintManager { */ public static final int FINGERPRINT_ERROR_LOCKOUT_PERMANENT = 9; + /** + * The user canceled the operation. Upon receiving this, applications should use alternate + * authentication (e.g. a password). The application should also provide the means to return + * to fingerprint authentication, such as a "use fingerprint" button. + */ + public static final int FINGERPRINT_ERROR_USER_CANCELED = 10; + /** * @hide */