diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 9d8f1fc5f1bf4..3b4a31b6cb790 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -808,7 +808,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp }; private final Consumer mPerformLayout = w -> { - if (w.mLayoutAttached || w.skipLayout()) { + if (w.mLayoutAttached) { return; } @@ -866,7 +866,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp }; private final Consumer mPerformLayoutAttached = w -> { - if (!w.mLayoutAttached || w.skipLayout()) { + if (!w.mLayoutAttached) { return; } if (DEBUG_LAYOUT) Slog.v(TAG, "2ND PASS " + w + " mHaveFrame=" + w.mHaveFrame diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index cbb9d5db8db34..7a2a311dd0f88 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -1494,6 +1494,9 @@ public class DisplayPolicy { * @param displayFrames The display frames. */ public void layoutWindowLw(WindowState win, WindowState attached, DisplayFrames displayFrames) { + if (win.skipLayout()) { + return; + } // This window might be in the simulated environment. // We invoke this to get the proper DisplayFrames.