summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-08-10 18:20:43 -0700
committerJorim Jaggi <jjaggi@google.com>2015-08-12 01:58:12 +0000
commita4b51bc4fd4a3e40871fb8d77c2173f0c38bd162 (patch)
treef47205289034efc93100fc032f075949b46809ff /services
parent968fc3ab75b0de71f298c6241cab1be1e6d5c86e (diff)
downloadframeworks_base-a4b51bc4fd4a3e40871fb8d77c2173f0c38bd162.zip
frameworks_base-a4b51bc4fd4a3e40871fb8d77c2173f0c38bd162.tar.gz
frameworks_base-a4b51bc4fd4a3e40871fb8d77c2173f0c38bd162.tar.bz2
Fix Keyguard drawn timeout
The timeout for waiting for Keyguard drawn was posted at the wrong place. If the screen was turning on but the device wasn't waking up, like in doze mode, we didn't post the timeout, thus, if Keyguard wouldn't notify us, we would never unblock the screen. This doesn't really cause a user visible bug but it *could* prevent the screen from turning on if Keyguard doesn't behave nicely. Put it at the right place so I can sleep better. Bug: 21855614 Change-Id: Icda31399261b4ee80c292ce09a0858b0127e2999
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index c4ff277..bfd1fed 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5492,10 +5492,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// may happen in a future call to goToSleep.
synchronized (mLock) {
mAwake = true;
- if (mKeyguardDelegate != null) {
- mHandler.removeMessages(MSG_KEYGUARD_DRAWN_TIMEOUT);
- mHandler.sendEmptyMessageDelayed(MSG_KEYGUARD_DRAWN_TIMEOUT, 1000);
- }
updateWakeGestureListenerLp();
updateOrientationListenerLp();
@@ -5585,6 +5581,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mScreenOnListener = screenOnListener;
if (mKeyguardDelegate != null) {
+ mHandler.removeMessages(MSG_KEYGUARD_DRAWN_TIMEOUT);
+ mHandler.sendEmptyMessageDelayed(MSG_KEYGUARD_DRAWN_TIMEOUT, 1000);
mKeyguardDelegate.onScreenTurningOn(mKeyguardDrawnCallback);
} else {
if (DEBUG_WAKEUP) Slog.d(TAG,