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

Commit 2981024f authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix unnecessary onApplyWindowInsets"

parents 76e63fe5 0a082e72
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2221,8 +2221,9 @@ public final class ViewRootImpl implements ViewParent,
        return insets;
    }

    void dispatchApplyInsets(View host) {
    public void dispatchApplyInsets(View host) {
        Trace.traceBegin(Trace.TRACE_TAG_VIEW, "dispatchApplyInsets");
        mApplyInsetsRequested = false;
        WindowInsets insets = getWindowInsets(true /* forceConstruct */);
        final boolean dispatchCutout = (mWindowAttributes.layoutInDisplayCutoutMode
                == LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS);
@@ -2459,7 +2460,6 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (mApplyInsetsRequested) {
            mApplyInsetsRequested = false;
            updateVisibleInsets();
            dispatchApplyInsets(host);
            if (mLayoutRequested) {
@@ -2636,7 +2636,6 @@ public final class ViewRootImpl implements ViewParent,
                if (contentInsetsChanged || mLastSystemUiVisibility !=
                        mAttachInfo.mSystemUiVisibility || mApplyInsetsRequested) {
                    mLastSystemUiVisibility = mAttachInfo.mSystemUiVisibility;
                    mApplyInsetsRequested = false;
                    dispatchApplyInsets(host);
                    // We applied insets so force contentInsetsChanged to ensure the
                    // hierarchy is measured below.