Compare updated measured size of root view
If the size of root view is known, performMeasure will be deferred (mViewMeasureDeferred). The measured new size mMeasuredWidth/Height will be set in setMeasuredRootSizeFromSpec, and the measured size of the root view (host.getMeasuredWidth/Height) is still the old one. If the size of root view is unknown, performMeasure will be called that also updates root view's size to mMeasuredWidth/Height. This case is the same as original. So when comparing the size, it should use mMeasuredWidth/Height. Otherwise windowShouldResize may be false that misses to apply the new size for window and surface. Fix: 412900134 Flag: EXEMPT bugfix Test: atest ViewRootImplTest#relayoutOnWindowSizeChange Change-Id: I2386d85f5bf0e8f482e9c508ac6ec36dcc6a6a8d
Loading
Please register or sign in to comment