diff options
author | Jim Miller <jaggies@google.com> | 2011-07-14 15:04:42 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2011-07-14 15:04:42 -0700 |
commit | dcb9376913a954266d07733e5e33bd846230cff8 (patch) | |
tree | 8d6c986cf6104a30a2c5ca051c92103b1370b607 /policy | |
parent | 9f845cff9b72b27eadb55298bdcf0104599f9385 (diff) | |
download | frameworks_base-dcb9376913a954266d07733e5e33bd846230cff8.zip frameworks_base-dcb9376913a954266d07733e5e33bd846230cff8.tar.gz frameworks_base-dcb9376913a954266d07733e5e33bd846230cff8.tar.bz2 |
Fix 5027468: prevent screen from turning back on while lockscreen in password mode.
This fixes a bug where LockScreen would turn back on due to the sequence of events
that ultimately cause PasswordUnlockScreen.onResume() to be called when the device powers off.
This is required because the lockscreen rebuilds itself before the screen turns off
so that it's ready to show immediately when the device comes back on.
Change-Id: I86a61cc3b1d77cf7f2a9a198051ea2bbe90607b2
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java index 75e799c..e177565 100644 --- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java +++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java @@ -75,6 +75,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen private StatusView mStatusView; private final boolean mUseSystemIME = true; // TODO: Make configurable + private boolean mResuming; // used to prevent poking the wakelock during onResume() // To avoid accidental lockout due to events while the device in in the pocket, ignore // any passwords with length less than or equal to this length. @@ -185,7 +186,9 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen } public void afterTextChanged(Editable s) { - mCallback.pokeWakelock(); + if (!mResuming) { + mCallback.pokeWakelock(); + } } }); } @@ -208,6 +211,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen /** {@inheritDoc} */ public void onResume() { + mResuming = true; // reset status mStatusView.resetStatusInfo(mUpdateMonitor, mLockPatternUtils); @@ -222,6 +226,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen if (deadline != 0) { handleAttemptLockout(deadline); } + mResuming = false; } /** {@inheritDoc} */ |