Merge "Revert "Get rid of double measure"" into tm-dev am: 80832d2efe

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19119508

Change-Id: Id6fccc3f7ac94f3ae5e679463e5b76ad75f75522
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Wale Ogunwale
2022-06-29 22:41:08 +00:00
committed by Automerger Merge Worker

View File

@@ -2804,10 +2804,6 @@ public final class ViewRootImpl implements ViewParent,
// Execute enqueued actions on every traversal in case a detached view enqueued an action
getRunQueue().executeActions(mAttachInfo.mHandler);
if (mApplyInsetsRequested) {
dispatchApplyInsets(host);
}
if (mFirst) {
// make sure touch mode code executes by setting cached value
// to opposite of the added touch mode.
@@ -2871,6 +2867,18 @@ public final class ViewRootImpl implements ViewParent,
}
}
if (mApplyInsetsRequested) {
dispatchApplyInsets(host);
if (mLayoutRequested) {
// Short-circuit catching a new layout request here, so
// we don't need to go through two layout passes when things
// change due to fitting system windows, which can happen a lot.
windowSizeMayChange |= measureHierarchy(host, lp,
mView.getContext().getResources(),
desiredWindowWidth, desiredWindowHeight);
}
}
if (layoutRequested) {
// Clear this now, so that if anything requests a layout in the
// rest of this function we will catch it and re-run a full