Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 688fa649 authored by Tim Murray's avatar Tim Murray Committed by android-build-merger
Browse files

Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows""...

Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev am: 2ea2a58d
am: a277618a

Change-Id: I93766a82ae5f3bd33391d4197710ce20e90ef53b
parents 27a1e98a a277618a
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -2026,18 +2026,9 @@ public final class ViewRootImpl implements ViewParent,
                mDisplay.getRealSize(size);
                desiredWindowWidth = size.x;
                desiredWindowHeight = size.y;
            } else if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT
                    || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
                // For wrap content, we have to remeasure later on anyways. Use size consistent with
                // below so we get best use of the measure cache.
                desiredWindowWidth = dipToPx(config.screenWidthDp);
                desiredWindowHeight = dipToPx(config.screenHeightDp);
            } else {
                // After addToDisplay, the frame contains the frameHint from window manager, which
                // for most windows is going to be the same size as the result of relayoutWindow.
                // Using this here allows us to avoid remeasuring after relayoutWindow
                desiredWindowWidth = frame.width();
                desiredWindowHeight = frame.height();
                desiredWindowWidth = mWinFrame.width();
                desiredWindowHeight = mWinFrame.height();
            }

            // We used to use the following condition to choose 32 bits drawing caches: