summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2015-06-03 17:06:46 -0700
committer Adrian Roos <roosa@google.com> 2015-06-04 01:15:53 +0000
commit02a28885bf652e69ac16f2f5a0804f4913571924 (patch)
tree156de9c966b74b4fd6cbc97f8c695a2a19a20966
parentd5169157408eeb8d5612b2c0272d6458ad4020de (diff)
Be more conservative about initial keyguard state
Prevents a race condition that could lead to leaking the home screen if Keyguard is too slow at pushing its state to the window manager while booting. Bug: 21128921 Change-Id: I992066c2c4e1bc4f797776c7804408a53b658b03
-rw-r--r--services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
index 01c110fe2eb6..f1f9c5087aa7 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
@@ -36,10 +36,11 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub {
// Keyguard changes its state, it always triggers a layout in window manager. Because
// IKeyguardStateCallback is synchronous and because these states are declared volatile, it's
// guaranteed that window manager picks up the new state all the time in the layout caused by
- // the state change of Keyguard.
- private volatile boolean mIsShowing;
- private volatile boolean mSimSecure;
- private volatile boolean mInputRestricted;
+ // the state change of Keyguard. To be extra safe, assume most restrictive values until Keyguard
+ // tells us the actual value.
+ private volatile boolean mIsShowing = true;
+ private volatile boolean mSimSecure = true;
+ private volatile boolean mInputRestricted = true;
private int mCurrentUserId;