summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jim Miller <jaggies@google.com> 2015-08-25 23:22:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-08-25 23:22:29 +0000
commit01c5bf5470a8c1c75f74792d8be1dada3a6f7b8a (patch)
tree42a6d14a04bb381d98d28317aa3837d37f6e274e
parente30e8980a1ceeacdc7ecafd36a622cc93d7ab3fc (diff)
parent827afdab0eb620ed139c4ab519ac837cb718296b (diff)
Merge "Handle driver errors from remove, enroll and auth." into mnc-dr-dev
-rw-r--r--services/core/java/com/android/server/fingerprint/FingerprintService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index 932662fe72bc..470bd5ac86b6 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -298,6 +298,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
final int result = daemon.enroll(cryptoToken, groupId, timeout);
if (result != 0) {
Slog.w(TAG, "startEnroll failed, result=" + result);
+ dispatchError(mHalDeviceId, FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
}
} catch (RemoteException e) {
Slog.e(TAG, "startEnroll failed", e);
@@ -391,6 +392,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
final int result = daemon.authenticate(opId, groupId);
if (result != 0) {
Slog.w(TAG, "startAuthentication failed, result=" + result);
+ dispatchError(mHalDeviceId, FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
}
} catch (RemoteException e) {
Slog.e(TAG, "startAuthentication failed", e);
@@ -433,12 +435,14 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
return;
}
+ stopPendingOperations(true);
mRemoveClient = new ClientMonitor(token, receiver, userId, restricted);
// The fingerprint template ids will be removed when we get confirmation from the HAL
try {
final int result = daemon.remove(fingerId, userId);
if (result != 0) {
Slog.w(TAG, "startRemove with id = " + fingerId + " failed, result=" + result);
+ dispatchError(mHalDeviceId, FingerprintManager.FINGERPRINT_ERROR_HW_UNAVAILABLE);
}
} catch (RemoteException e) {
Slog.e(TAG, "startRemove failed", e);