Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39781a66 authored by Kevin Chyn's avatar Kevin Chyn Committed by android-build-team Robot
Browse files

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
(cherry picked from commit 7a207e47)
parent e61fe9ab
Loading
Loading
Loading
Loading
+13 −10
Original line number Original line Diff line number Diff line
@@ -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