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

Commit 60b5509f authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Fix layout-in-layout logic"

parents 6f249d99 d5a83525
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1936,6 +1936,7 @@ public final class ViewRootImpl implements ViewParent,
        Trace.traceBegin(Trace.TRACE_TAG_VIEW, "layout");
        try {
            host.layout(0, 0, host.getMeasuredWidth(), host.getMeasuredHeight());
            mInLayout = false;
            int numViewsRequestingLayout = mLayoutRequesters.size();
            if (numViewsRequestingLayout > 0) {
                // requestLayout() was called during layout: unusual, but try to handle correctly
@@ -1944,6 +1945,7 @@ public final class ViewRootImpl implements ViewParent,
                    mLayoutRequesters.get(i).requestLayout();
                }
                // Now run layout one more time
                mInLayout = true;
                host.layout(0, 0, host.getMeasuredWidth(), host.getMeasuredHeight());
                mHandlingLayoutInLayoutRequest = false;
                mLayoutRequesters.clear();