diff options
author | Jim Miller <jaggies@google.com> | 2013-11-07 19:15:49 -0800 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2013-11-07 19:15:49 -0800 |
commit | 0b9d8accc569d8b51fd76118ce2f069c24b9af90 (patch) | |
tree | a18e5d64509327aaa44de0aead6ec381fedac2b8 | |
parent | 3192148fb493836fa8f3008b8ec95c836ac9a515 (diff) | |
download | frameworks_base-0b9d8accc569d8b51fd76118ce2f069c24b9af90.zip frameworks_base-0b9d8accc569d8b51fd76118ce2f069c24b9af90.tar.gz frameworks_base-0b9d8accc569d8b51fd76118ce2f069c24b9af90.tar.bz2 |
Delay tearing down external displays until keyguard finishes
This waits until the keyguard window is actually removed before turning
off external presentations to avoid flashing the user's password.
Fixes bug 11562369
Change-Id: I74bfc0d5e23dccc5a8628abfe02868c71c371f6e
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java | 7 | ||||
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java index fd7cae6..6aa0a4b 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java @@ -61,9 +61,11 @@ import android.widget.FrameLayout; public class KeyguardViewManager { private final static boolean DEBUG = KeyguardViewMediator.DEBUG; private static String TAG = "KeyguardViewManager"; - public static boolean USE_UPPER_CASE = true; public final static String IS_SWITCHING_USER = "is_switching_user"; + // Delay dismissing keyguard to allow animations to complete. + private static final int HIDE_KEYGUARD_DELAY = 500; + // Timeout used for keypresses static final int DIGIT_PRESS_WAKE_MILLIS = 5000; @@ -509,9 +511,10 @@ public class KeyguardViewManager { mKeyguardHost.setCustomBackground(null); updateShowWallpaper(true); mKeyguardHost.removeView(lastView); + mViewMediatorCallback.keyguardGone(); } } - }, 500); + }, HIDE_KEYGUARD_DELAY); } } } diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java index a1ff1f1..49982ea 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java @@ -309,6 +309,11 @@ public class KeyguardViewMediator { * Report that the keyguard is dismissable, pending the next keyguardDone call. */ void keyguardDonePending(); + + /** + * Report when keyguard is actually gone + */ + void keyguardGone(); } KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { @@ -462,6 +467,11 @@ public class KeyguardViewMediator { public void keyguardDonePending() { mKeyguardDonePending = true; } + + @Override + public void keyguardGone() { + mKeyguardDisplayManager.hide(); + } }; private void userActivity() { @@ -1248,7 +1258,6 @@ public class KeyguardViewMediator { mKeyguardDonePending = false; updateActivityLockScreenState(); adjustStatusBarLocked(); - mKeyguardDisplayManager.hide(); } } |