summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2014-09-26 12:36:51 -0400
committerJason Monk <jmonk@google.com>2014-09-26 12:53:29 -0400
commit5eeebf5c29c49be5fc29558c6b16ffe5df87b690 (patch)
tree4c6e74007ebbd545ff97f321f427469457dd9186 /policy/src
parente1b032a84086a5d6f36b6910171110543224bdf5 (diff)
downloadframeworks_base-5eeebf5c29c49be5fc29558c6b16ffe5df87b690.zip
frameworks_base-5eeebf5c29c49be5fc29558c6b16ffe5df87b690.tar.gz
frameworks_base-5eeebf5c29c49be5fc29558c6b16ffe5df87b690.tar.bz2
Don't start the keyguard until boot is done.
Create the KeyguardServiceDelegate but don't bind until boot is done. Until the keyguard is bound, the delegate will assume it should be in a secure state. Bug: 17464800 Change-Id: I91650d1e3e3ea993168855bc3444b905aac9aac3
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java1
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java6
2 files changed, 5 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 006f5db..f58017f 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -5268,6 +5268,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void systemBooted() {
if (mKeyguardDelegate != null) {
+ mKeyguardDelegate.bindService(mContext);
mKeyguardDelegate.onBootCompleted();
}
synchronized (mLock) {
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 e9ca5c9..50fe7c7 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
@@ -102,9 +102,12 @@ public class KeyguardServiceDelegate {
};
public KeyguardServiceDelegate(Context context, LockPatternUtils lockPatternUtils) {
+ mScrim = createScrim(context);
+ }
+
+ public void bindService(Context context) {
Intent intent = new Intent();
intent.setClassName(KEYGUARD_PACKAGE, KEYGUARD_CLASS);
- mScrim = createScrim(context);
if (!context.bindServiceAsUser(intent, mKeyguardConnection,
Context.BIND_AUTO_CREATE, UserHandle.OWNER)) {
if (DEBUG) Log.v(TAG, "*** Keyguard: can't bind to " + KEYGUARD_CLASS);
@@ -250,7 +253,6 @@ public class KeyguardServiceDelegate {
if (mKeyguardService != null) {
mKeyguardService.onSystemReady();
} else {
- if (DEBUG) Log.v(TAG, "onSystemReady() called before keyguard service was ready");
mKeyguardState.systemIsReady = true;
}
}