diff options
| author | 2023-10-23 16:22:54 +0800 | |
|---|---|---|
| committer | 2023-10-27 09:25:46 +0800 | |
| commit | 1b28b09df19599a20e06488a43932e0fbf68120e (patch) | |
| tree | 6d6fb856111eda3d627810b0bbf43ee946d6befb | |
| parent | 04e59b174f08920d7b39982b8a4b13d2385928ea (diff) | |
Enable lockout timeout
Fix a bug that the user can still enter pin/pattern
during lockout timeout when doing special user
credential verification.
Bug: 301924294
Test: b/301924294#comment1
Change-Id: I3301a811a5038adc3014fb149274da86b8bd900d
| -rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 8d11672144b2..a3e0016f9174 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -1105,10 +1105,9 @@ public class LockPatternUtils { @UnsupportedAppUsage public long setLockoutAttemptDeadline(int userId, int timeoutMs) { final long deadline = SystemClock.elapsedRealtime() + timeoutMs; - if (isSpecialUserId(userId)) { - // For secure password storage (that is required for special users such as FRP), the - // underlying storage also enforces the deadline. Since we cannot store settings - // for special users, don't. + 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; } mLockoutDeadlines.put(userId, deadline); |