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
This commit is contained in:
Tiger Huang
2021-11-30 22:41:45 +08:00
parent 86ef373a37
commit 6f68248158
2 changed files with 5 additions and 2 deletions

View File

@@ -800,7 +800,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
};
private final Consumer<WindowState> 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<WindowState> mPerformLayoutAttached = w -> {
if (!w.mLayoutAttached || w.skipLayout()) {
if (!w.mLayoutAttached) {
return;
}
if (DEBUG_LAYOUT) Slog.v(TAG, "2ND PASS " + w + " mHaveFrame=" + w.mHaveFrame

View File

@@ -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.