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

Commit e46a2162 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add timeout parameter to generateChallenge

Bug: 115925222

Test: builds
Change-Id: Ie81af1ac0b6445fbf5a5344c5f54135256ee6e3d
parent e0ef793d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -82,6 +82,7 @@ public class FaceService extends BiometricService {
            "com.android.server.biometrics.face.ACTION_LOCKOUT_RESET";
            "com.android.server.biometrics.face.ACTION_LOCKOUT_RESET";
    private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED = 3;
    private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED = 3;
    private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 12;
    private static final int MAX_FAILED_ATTEMPTS_LOCKOUT_PERMANENT = 12;
    private static final int CHALLENGE_TIMEOUT_SEC = 600; // 10 minutes


    private final class FaceAuthClient extends AuthenticationClientImpl {
    private final class FaceAuthClient extends AuthenticationClientImpl {
        public FaceAuthClient(Context context,
        public FaceAuthClient(Context context,
@@ -783,7 +784,7 @@ public class FaceService extends BiometricService {
            return 0;
            return 0;
        }
        }
        try {
        try {
            return daemon.generateChallenge().value;
            return daemon.generateChallenge(CHALLENGE_TIMEOUT_SEC).value;
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            Slog.e(TAG, "startPreEnroll failed", e);
            Slog.e(TAG, "startPreEnroll failed", e);
        }
        }