summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2014-09-26 12:36:51 -0400
committer Jason Monk <jmonk@google.com> 2014-09-26 12:53:29 -0400
commit5eeebf5c29c49be5fc29558c6b16ffe5df87b690 (patch)
tree4c6e74007ebbd545ff97f321f427469457dd9186
parente1b032a84086a5d6f36b6910171110543224bdf5 (diff)
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
-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 006f5db88ba6..f58017f48cc4 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 e9ca5c97ad6c..50fe7c73c77e 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;
}
}