Merge "Send FINGERPRINT_ERROR_LOCKOUT on some devices" into nyc-dev
This commit is contained in:
@@ -74,12 +74,23 @@ public abstract class AuthenticationClient extends ClientMonitor {
|
|||||||
} else {
|
} else {
|
||||||
result = true; // client not listening
|
result = true; // client not listening
|
||||||
}
|
}
|
||||||
if (fingerId == 0) {
|
if (!authenticated) {
|
||||||
if (receiver != null) {
|
if (receiver != null) {
|
||||||
FingerprintUtils.vibrateFingerprintError(getContext());
|
FingerprintUtils.vibrateFingerprintError(getContext());
|
||||||
}
|
}
|
||||||
// allow system-defined limit of number of attempts before giving up
|
// allow system-defined limit of number of attempts before giving up
|
||||||
result |= handleFailedAttempt();
|
boolean inLockoutMode = handleFailedAttempt();
|
||||||
|
// send lockout event in case driver doesn't enforce it.
|
||||||
|
if (inLockoutMode) {
|
||||||
|
try {
|
||||||
|
Slog.w(TAG, "Forcing lockout (fp driver code should do this!)");
|
||||||
|
receiver.onError(getHalDeviceId(),
|
||||||
|
FingerprintManager.FINGERPRINT_ERROR_LOCKOUT);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Slog.w(TAG, "Failed to notify lockout:", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result |= inLockoutMode;
|
||||||
} else {
|
} else {
|
||||||
if (receiver != null) {
|
if (receiver != null) {
|
||||||
FingerprintUtils.vibrateFingerprintSuccess(getContext());
|
FingerprintUtils.vibrateFingerprintSuccess(getContext());
|
||||||
|
|||||||
Reference in New Issue
Block a user