OSDN Git Service

am da506ffa: am 14818725: am 80f99121: Merge "Prevent infinite layout and wallpaper...
authorCraig Mautner <cmautner@google.com>
Tue, 21 Apr 2015 15:41:26 +0000 (15:41 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Tue, 21 Apr 2015 15:41:26 +0000 (15:41 +0000)
* commit 'da506ffabadd551241e23aecf08e378e7d0f30b1':
  Prevent infinite layout and wallpaper flashing

services/core/java/com/android/server/policy/PhoneWindowManager.java

index fce01e5..ad85b59 100644 (file)
@@ -4215,8 +4215,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     /** {@inheritDoc} */
     @Override
     public int finishPostLayoutPolicyLw() {
-        if (mWinShowWhenLocked != null &&
-                mWinShowWhenLocked != mTopFullscreenOpaqueWindowState) {
+        if (mWinShowWhenLocked != null && mTopFullscreenOpaqueWindowState != null &&
+                mWinShowWhenLocked.getAppToken() != mTopFullscreenOpaqueWindowState.getAppToken()
+                && isKeyguardLocked()) {
             // A dialog is dismissing the keyguard. Put the wallpaper behind it and hide the
             // fullscreen window.
             // TODO: Make sure FLAG_SHOW_WALLPAPER is restored when dialog is dismissed. Or not.