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

Commit b7d81d9a authored by Adrian Roos's avatar Adrian Roos
Browse files

FRP: Fix crash after lockout

Change-Id: Ie8cd85c6afd61a03dfe730432702c11c29c11cce
Fixes: 37746493
Test: Trigger FRP, enter wrong credential 10 times, verify no crash.
parent 365ce730
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1212,6 +1212,11 @@ public class LockPatternUtils {
     */
    public long setLockoutAttemptDeadline(int userId, int timeoutMs) {
        final long deadline = SystemClock.elapsedRealtime() + timeoutMs;
        if (userId == USER_FRP) {
            // For secure password storage (that is required for FRP), the underlying storage also
            // enforces the deadline. Since we cannot store settings for the FRP user, don't.
            return deadline;
        }
        setLong(LOCKOUT_ATTEMPT_DEADLINE, deadline, userId);
        setLong(LOCKOUT_ATTEMPT_TIMEOUT_MS, timeoutMs, userId);
        return deadline;