From cfdd6242eb0c26373b9c57d2ad1ddc126708189e Mon Sep 17 00:00:00 2001 From: Brian Colonna Date: Wed, 28 Sep 2011 20:20:55 -0400 Subject: [PATCH] Fix 5385186 - Face Unlock no longer shown when first booted Face Unlock used to show on first boot via an onScreenTurnedOn() callback. At some point something changed and this no longer gets called at boot time. This left us in the state where the black box was covering the backup method, but Face Unlock was not starting. Instead of finding a new way to make Face Unlock start at boot, it was decided that it is probably best for it not to start at boot anyway. So much is happening at boot time, including camera initialization, that trying to make this work right might cause more problems than it solves. This fix moves the code that makes the black box cover the backup method. Instead of happening when the layout is originally created, it now happens in the show() function, which gets called not only when the screen is turned on, but also before the screen turns off, such that it is ready to go when the screen turns back on. This not only keeps the black box from displaying on boot (because show() doesn't get called at boot time), but also makes sure the black box is already there before the screen is turned on, preventing any glitches that may briefly show the underlying backup method. Change-Id: I99bdae561a70918b5f12ea5badff08b07d74403c --- .../policy/impl/LockPatternKeyguardView.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 325dfd3922e4d..2c7f86d718446 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -530,6 +530,12 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler } else { ((KeyguardScreen) mUnlockScreen).onResume(); } + + if (mLockPatternUtils.usingBiometricWeak()) { + mHandler.sendEmptyMessage(MSG_SHOW_FACELOCK_AREA_VIEW); + } else { + mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW); + } } private void recreateLockScreen() { @@ -980,12 +986,6 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler mFaceLockAreaView = view.findViewById(R.id.faceLockAreaView); if (mFaceLockAreaView == null) { if (DEBUG) Log.d(TAG, "Layout does not have faceLockAreaView"); - } else { - if (mLockPatternUtils.usingBiometricWeak()) { - mHandler.sendEmptyMessage(MSG_SHOW_FACELOCK_AREA_VIEW); - } else { - mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW); - } } }