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

Commit a87c74d7 authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge \\\"Do a forceLayout if pending insets is changed after relayout...

Merge \\\"Do a forceLayout if pending insets is changed after relayout window\\\" into nyc-dev am: 2756d070 am: dba235d9
am: 788f4309

Change-Id: I3de76ea399768aa9f9cc504bdcb25208e60c579d
parents 5954752f 788f4309
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1822,6 +1822,19 @@ public final class ViewRootImpl implements ViewParent,
                            + mAttachInfo.mVisibleInsets);
                }

                // If any of the insets changed, do a forceLayout on the view so that the
                // measure cache is cleared. We might have a pending MSG_RESIZED_REPORT
                // that is supposed to take care of it, but since pending insets are
                // already modified here, it won't detect the frame change after this.
                final boolean framesChanged = overscanInsetsChanged
                        || contentInsetsChanged
                        || stableInsetsChanged
                        || visibleInsetsChanged
                        || outsetsChanged;
                if (mAdded && mView != null && framesChanged) {
                    forceLayout(mView);
                }

                if (!hadSurface) {
                    if (mSurface.isValid()) {
                        // If we are creating a new surface, then we need to