ResetLockout should be scheduled on FaceService's handler

Fixes: 138501368

Test: Reject 5 times and get locked out
      Enter password
      Go back to lockscreen, no longer locked out

Change-Id: I23e3022bcca533f3cacb03aa79bf0a68a9e01de2
This commit is contained in:
Kevin Chyn
2019-07-27 17:50:33 -07:00
parent 8df3caae91
commit 7a207e4716

View File

@@ -344,16 +344,19 @@ public class FaceService extends BiometricServiceBase {
@Override // Binder call
public int revokeChallenge(IBinder token) {
checkPermission(MANAGE_BIOMETRIC);
// TODO(b/137106905): Schedule binder calls in FaceService to avoid deadlocks.
if (getCurrentClient() == null) {
// if we aren't handling any other HIDL calls (mCurrentClient == null), revoke the
// challenge right away.
return startRevokeChallenge(token);
} else {
// postpone revoking the challenge until we finish processing the current HIDL call.
mRevokeChallengePending = true;
return Status.OK;
}
mHandler.post(() -> {
// TODO(b/137106905): Schedule binder calls in FaceService to avoid deadlocks.
if (getCurrentClient() == null) {
// if we aren't handling any other HIDL calls (mCurrentClient == null), revoke
// the challenge right away.
startRevokeChallenge(token);
} else {
// postpone revoking the challenge until we finish processing the current HIDL
// call.
mRevokeChallengePending = true;
}
});
return Status.OK;
}
@Override // Binder call