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

Commit f4b8c343 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am 9aebdb4c: am d7d14033: am 2d34a8b7: Merge "Revert "Do not forceLayout when...

am 9aebdb4c: am d7d14033: am 2d34a8b7: Merge "Revert "Do not forceLayout when window is resized"" into mnc-dev

* commit '9aebdb4c':
  Revert "Do not forceLayout when window is resized"
parents 94933e43 9aebdb4c
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -3159,6 +3159,17 @@ public final class ViewRootImpl implements ViewParent,
        return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent);
    }

    private static void forceLayout(View view) {
        view.forceLayout();
        if (view instanceof ViewGroup) {
            ViewGroup group = (ViewGroup) view;
            final int count = group.getChildCount();
            for (int i = 0; i < count; i++) {
                forceLayout(group.getChildAt(i));
            }
        }
    }

    private final static int MSG_INVALIDATE = 1;
    private final static int MSG_INVALIDATE_RECT = 2;
    private final static int MSG_DIE = 3;
@@ -3297,6 +3308,10 @@ public final class ViewRootImpl implements ViewParent,
                        mReportNextDraw = true;
                    }

                    if (mView != null) {
                        forceLayout(mView);
                    }

                    requestLayout();
                }
                break;
@@ -3311,6 +3326,9 @@ public final class ViewRootImpl implements ViewParent,
                    mWinFrame.top = t;
                    mWinFrame.bottom = t + h;

                    if (mView != null) {
                        forceLayout(mView);
                    }
                    requestLayout();
                }
                break;