Merge "ResetLockout should be scheduled on FaceService's handler" into qt-r1-dev am: 7809a34760 am: 395b4728eb

am: 3b24f7aeff

Change-Id: Ia7bd4bfcb68d882c3e1b4e8230ecba1d0b1aff0e
This commit is contained in:
Kevin Chyn
2019-07-28 17:09:32 -07:00
committed by android-build-merger

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