From 6f68248158d572c0aee93ada245749fae8d7567e Mon Sep 17 00:00:00 2001 From: Tiger Huang Date: Tue, 30 Nov 2021 22:41:45 +0800 Subject: [PATCH] Move win.skipLayout into policy.layoutWindowLw This CL restore the previous logic to skip layout but still update mLayoutSeq. In this way, we can still report resized to the client. Fix: 207144283 Test: atest PinnedStackTests#testTranslucentActivityOnTopOfPinnedTask Change-Id: I5a4a09899fef194d002a7e74bc4ad64685d4e689 --- services/core/java/com/android/server/wm/DisplayContent.java | 4 ++-- services/core/java/com/android/server/wm/DisplayPolicy.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 42c81248da34b..c81a82e2197bc 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -800,7 +800,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp }; private final Consumer mPerformLayout = w -> { - if (w.mLayoutAttached || w.skipLayout()) { + if (w.mLayoutAttached) { return; } @@ -858,7 +858,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 a492b7abacbc7..dda50af84e6ea 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -1490,6 +1490,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.