Merge "ResetLockout should be scheduled on FaceService's handler" into qt-r1-dev

This commit is contained in:
Kevin Chyn
2019-07-28 23:27:56 +00:00
committed by Android (Google) Code Review

View File

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