Window: Provide frame size hint to ViewRootImpl
Provides a better estimate to the ViewRootImpl about the likely
window frame size than it can get from the configuration, which
allows it to avoid unneccessary measure passes.
Bug: 73813813
Test: atest PhoneWindowManagerLayoutTest
Change-Id: Ia4de6509416d90eed61929ce1646904c31afdd8d
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
index e4db3b0..a9e53a1 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
@@ -198,7 +198,7 @@
}
try {
final int res = session.addToDisplay(window, window.mSeq, layoutParams,
- View.GONE, token.getDisplayContent().getDisplayId(), tmpRect, tmpRect,
+ View.GONE, token.getDisplayContent().getDisplayId(), tmpFrame, tmpRect, tmpRect,
tmpRect, tmpCutout, null);
if (res < 0) {
Slog.w(TAG, "Failed to add snapshot starting window res=" + res);