diff options
author | Jim Miller <jaggies@google.com> | 2013-11-13 15:40:48 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2013-11-13 15:40:48 -0800 |
commit | e5f17ab5a61a69aaa36b883a9abdeab9cba6c48e (patch) | |
tree | 487bce2abc43c0f6673a9198abd28502a03c3704 /policy/src | |
parent | c641de017ae0b15bbc13f43fd14fca6b1523ec02 (diff) | |
download | frameworks_base-e5f17ab5a61a69aaa36b883a9abdeab9cba6c48e.zip frameworks_base-e5f17ab5a61a69aaa36b883a9abdeab9cba6c48e.tar.gz frameworks_base-e5f17ab5a61a69aaa36b883a9abdeab9cba6c48e.tar.bz2 |
Report keyguard as initially showing and secure until we know
This fixes a bug where an app calls KeyguardManager.isLocked()
before keyguard has had a chance to show. The fix is to assume
keyguard is showing and secure until we know otherwise.
Fixes bug 11670159
Change-Id: Ifbe4cdf40e3b76d2069ecace940f85fa58f31187
Diffstat (limited to 'policy/src')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java index bf22e2f..1357462 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java @@ -40,6 +40,14 @@ public class KeyguardServiceDelegate { private KeyguardState mKeyguardState = new KeyguardState(); /* package */ static final class KeyguardState { + KeyguardState() { + // Assume keyguard is showing and secure until we know for sure. This is here in + // the event something checks before the service is actually started. + // KeyguardService itself should default to this state until the real state is known. + showing = true; + showingAndNotHidden = true; + secure = true; + } boolean showing; boolean showingAndNotHidden; boolean inputRestricted; |