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

Commit 4351d1cb authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Don't invoke resetLockout when not enrolled"

parents bbc42684 1d6a2867
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -46,9 +46,9 @@ import android.os.RemoteException;
import android.os.SELinux;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.restricted_image.RestrictedImagesDumpProto;
import android.service.restricted_image.RestrictedImageProto;
import android.service.restricted_image.RestrictedImageSetProto;
import android.service.restricted_image.RestrictedImagesDumpProto;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;

@@ -383,6 +383,12 @@ public class FaceService extends BiometricServiceBase {
        @Override // Binder call
        public void resetLockout(byte[] token) {
            checkPermission(MANAGE_BIOMETRIC);

            if (!FaceService.this.hasEnrolledBiometrics(mCurrentUserId)) {
                Slog.w(TAG, "Ignoring lockout reset, no templates enrolled");
                return;
            }

            try {
                mDaemonWrapper.resetLockout(token);
            } catch (RemoteException e) {
+6 −0
Original line number Diff line number Diff line
@@ -419,6 +419,12 @@ public class FingerprintService extends BiometricServiceBase {
        @Override // Binder call
        public void resetTimeout(byte [] token) {
            checkPermission(RESET_FINGERPRINT_LOCKOUT);

            if (!FingerprintService.this.hasEnrolledBiometrics(mCurrentUserId)) {
                Slog.w(TAG, "Ignoring lockout reset, no templates enrolled");
                return;
            }

            // TODO: confirm security token when we move timeout management into the HAL layer.
            mHandler.post(mResetFailedAttemptsForCurrentUserRunnable);
        }