am 62a7022f: am 56f10c26: am a9355bd1: Merge "Handle keyguard dismiss flags correctly" into lmp-mr1-dev

* commit '62a7022f7d831c166d7ffd198556df4a7f106510':
  Handle keyguard dismiss flags correctly
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index e4a5372..f70c7a8 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -4049,12 +4049,12 @@
                     mAppsToBeHidden.remove(appToken);
                     mAppsThatDismissKeyguard.remove(appToken);
                     if (mAppsToBeHidden.isEmpty()) {
-                        if (mKeyguardSecureIncludingHidden) {
+                        if (dismissKeyguard && !mKeyguardSecure) {
+                            mAppsThatDismissKeyguard.add(appToken);
+                        } else {
                             mWinShowWhenLocked = win;
                             mHideLockScreen = true;
                             mForceStatusBarFromKeyguard = false;
-                        } else if (dismissKeyguard && !mKeyguardSecure) {
-                            mAppsThatDismissKeyguard.add(appToken);
                         }
                     }
                 } else if (dismissKeyguard) {