Make sure to call dismissKeyguard after setOccluded am: ec50931d88

am: 1d4f2b9914

Change-Id: I27ef32dfb5963524c0c3efb03058f021799dda07
This commit is contained in:
Jorim Jaggi
2016-10-25 23:47:20 +00:00
committed by android-build-merger

View File

@@ -5410,18 +5410,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
} }
} else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) { } else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) {
mKeyguardHidden = false; mKeyguardHidden = false;
boolean willDismiss = false; boolean dismissKeyguard = false;
final boolean trusted = mKeyguardDelegate.isTrusted();
if (mDismissKeyguard == DISMISS_KEYGUARD_START) { if (mDismissKeyguard == DISMISS_KEYGUARD_START) {
final boolean trusted = mKeyguardDelegate.isTrusted(); final boolean willDismiss = trusted && mKeyguardOccluded
willDismiss = trusted && mKeyguardOccluded && mKeyguardDelegate != null && mKeyguardDelegate != null && mKeyguardDelegate.isShowing();
&& mKeyguardDelegate.isShowing();
if (willDismiss) { if (willDismiss) {
mCurrentlyDismissingKeyguard = true; mCurrentlyDismissingKeyguard = true;
} }
dismissKeyguard = true;
// Only launch the next keyguard unlock window once per window.
mHandler.post(() -> mKeyguardDelegate.dismiss(
trusted /* allowWhileOccluded */));
} }
// If we are currently dismissing Keyguard, there is no need to unocclude it. // If we are currently dismissing Keyguard, there is no need to unocclude it.
@@ -5432,6 +5429,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| FINISH_LAYOUT_REDO_WALLPAPER; | FINISH_LAYOUT_REDO_WALLPAPER;
} }
} }
if (dismissKeyguard) {
// Only launch the next keyguard unlock window once per window.
mHandler.post(() -> mKeyguardDelegate.dismiss(
trusted /* allowWhileOccluded */));
}
} else { } else {
mWinDismissingKeyguard = null; mWinDismissingKeyguard = null;
mSecureDismissingKeyguard = false; mSecureDismissingKeyguard = false;