diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-09-28 13:57:37 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-28 13:57:37 -0700 |
commit | e3e6d56b94b2c196659e15deffed9dc9028fa974 (patch) | |
tree | 042f9bb16a5420d7cdd2f0fa29eb5d0b68becc57 /core | |
parent | e1de9f674575df3b17e475c4f32dd93d33e596e3 (diff) | |
download | frameworks_base-e3e6d56b94b2c196659e15deffed9dc9028fa974.zip frameworks_base-e3e6d56b94b2c196659e15deffed9dc9028fa974.tar.gz frameworks_base-e3e6d56b94b2c196659e15deffed9dc9028fa974.tar.bz2 |
Fix jank: Don't write lockout deadline if not needed
In the longterm, we should move these synchronous writes
off the main thread, but in the short term, avoiding an unnecessary
write is good enough for the main case.
Bug: 24471234
Change-Id: Id996ff29e61410cd077760a06d7868a413ae88da
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 82ae2f3..60380fb 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -1074,7 +1074,7 @@ public class LockPatternUtils { long deadline = getLong(LOCKOUT_ATTEMPT_DEADLINE, 0L, userId); final long timeoutMs = getLong(LOCKOUT_ATTEMPT_TIMEOUT_MS, 0L, userId); final long now = SystemClock.elapsedRealtime(); - if (deadline < now) { + if (deadline < now && deadline != 0) { // timeout expired setLong(LOCKOUT_ATTEMPT_DEADLINE, 0, userId); setLong(LOCKOUT_ATTEMPT_TIMEOUT_MS, 0, userId); |