summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-07-09 16:08:02 -0700
committerJorim Jaggi <jjaggi@google.com>2015-07-10 21:06:44 +0000
commit4474f54f4eedbdf5d0b225647d50c0b05466a448 (patch)
treeeaaef7c9f6134baa85ee8c5ccf26c3536a0f31c4 /packages
parentc1541571ff501ba7f58ab9f066828e6620aaa90c (diff)
downloadframeworks_base-4474f54f4eedbdf5d0b225647d50c0b05466a448.zip
frameworks_base-4474f54f4eedbdf5d0b225647d50c0b05466a448.tar.gz
frameworks_base-4474f54f4eedbdf5d0b225647d50c0b05466a448.tar.bz2
Fix empty keyguard for once and all
When a Keyguard exit animation was played while the screen was turning off, the window animation was cancelled. However, since we didn't reset mPostKeyguardExitAnimation, we thought we need to apply it again, with a start time of Long.MIN_VALUE. For some reason, this animation never ended, and it was stuck at the beginning. Thus, the alpha was 0 and the user just saw a blank wallpaper. In addition, we also forbid starting the Keyguard exit animation when the screen is about to turn off. Bug: 21124013 Change-Id: Ief022c5bd758a9fedcaab3fe9fc385fa4234b37f
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 7f61fc1..009a0d6 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -253,6 +253,7 @@ public class KeyguardViewMediator extends SystemUI {
private KeyguardUpdateMonitor mUpdateMonitor;
private boolean mDeviceInteractive;
+ private boolean mGoingToSleep;
// last known state of the cellular connection
private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE;
@@ -639,6 +640,7 @@ public class KeyguardViewMediator extends SystemUI {
if (DEBUG) Log.d(TAG, "onStartedGoingToSleep(" + why + ")");
synchronized (this) {
mDeviceInteractive = false;
+ mGoingToSleep = true;
// Lock immediately based on setting if secure (user has a pin/pattern/password).
// This also "locks" the device when not secure to provide easy access to the
@@ -678,6 +680,7 @@ public class KeyguardViewMediator extends SystemUI {
if (DEBUG) Log.d(TAG, "onFinishedGoingToSleep(" + why + ")");
synchronized (this) {
mDeviceInteractive = false;
+ mGoingToSleep = false;
resetKeyguardDonePendingLocked();
mHideAnimationRun = false;
@@ -1239,6 +1242,10 @@ public class KeyguardViewMediator extends SystemUI {
}
mUpdateMonitor.clearFingerprintRecognized();
+ if (mGoingToSleep) {
+ Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
+ return;
+ }
if (mExitSecureCallback != null) {
try {
mExitSecureCallback.onKeyguardExitResult(authenticated);