am 3539d328: am 7f3a1557: am 0c758805: Merge "Fix empty keyguard for once and all" into mnc-dev

* commit '3539d32806b74bbcd6a89aa99ec31c5acc7e0546':
  Fix empty keyguard for once and all
This commit is contained in:
Jorim Jaggi
2015-07-13 22:48:37 +00:00
committed by Android Git Automerger
2 changed files with 9 additions and 2 deletions

View File

@@ -253,6 +253,7 @@ public class KeyguardViewMediator extends SystemUI {
private KeyguardUpdateMonitor mUpdateMonitor; private KeyguardUpdateMonitor mUpdateMonitor;
private boolean mDeviceInteractive; private boolean mDeviceInteractive;
private boolean mGoingToSleep;
// last known state of the cellular connection // last known state of the cellular connection
private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE; private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE;
@@ -639,6 +640,7 @@ public class KeyguardViewMediator extends SystemUI {
if (DEBUG) Log.d(TAG, "onStartedGoingToSleep(" + why + ")"); if (DEBUG) Log.d(TAG, "onStartedGoingToSleep(" + why + ")");
synchronized (this) { synchronized (this) {
mDeviceInteractive = false; mDeviceInteractive = false;
mGoingToSleep = true;
// Lock immediately based on setting if secure (user has a pin/pattern/password). // 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 // 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 + ")"); if (DEBUG) Log.d(TAG, "onFinishedGoingToSleep(" + why + ")");
synchronized (this) { synchronized (this) {
mDeviceInteractive = false; mDeviceInteractive = false;
mGoingToSleep = false;
resetKeyguardDonePendingLocked(); resetKeyguardDonePendingLocked();
mHideAnimationRun = false; mHideAnimationRun = false;
@@ -1239,6 +1242,10 @@ public class KeyguardViewMediator extends SystemUI {
} }
mUpdateMonitor.clearFingerprintRecognized(); mUpdateMonitor.clearFingerprintRecognized();
if (mGoingToSleep) {
Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
return;
}
if (mExitSecureCallback != null) { if (mExitSecureCallback != null) {
try { try {
mExitSecureCallback.onKeyguardExitResult(authenticated); mExitSecureCallback.onKeyguardExitResult(authenticated);

View File

@@ -349,6 +349,7 @@ public class WindowAnimator {
"Now policy hidden: " + win); "Now policy hidden: " + win);
} else { } else {
boolean applyExistingExitAnimation = mPostKeyguardExitAnimation != null boolean applyExistingExitAnimation = mPostKeyguardExitAnimation != null
&& !mPostKeyguardExitAnimation.hasEnded()
&& !winAnimator.mKeyguardGoingAwayAnimation && !winAnimator.mKeyguardGoingAwayAnimation
&& win.hasDrawnLw() && win.hasDrawnLw()
&& win.mAttachedWindow == null && win.mAttachedWindow == null
@@ -499,8 +500,7 @@ public class WindowAnimator {
mPostKeyguardExitAnimation.getStartOffset(), mPostKeyguardExitAnimation.getStartOffset(),
mPostKeyguardExitAnimation.getDuration()); mPostKeyguardExitAnimation.getDuration());
mKeyguardGoingAway = false; mKeyguardGoingAway = false;
} else if (mCurrentTime - mPostKeyguardExitAnimation.getStartTime() } else if (mPostKeyguardExitAnimation.hasEnded()) {
> mPostKeyguardExitAnimation.getDuration()) {
// Done with the animation, reset. // Done with the animation, reset.
if (DEBUG_KEYGUARD) Slog.v(TAG, "Done with Keyguard exit animations."); if (DEBUG_KEYGUARD) Slog.v(TAG, "Done with Keyguard exit animations.");
mPostKeyguardExitAnimation = null; mPostKeyguardExitAnimation = null;