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

Commit 1107b1d7 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fix ViewRoot inset adjustment after initial setup." into nyc-dev...

Merge "Merge "Fix ViewRoot inset adjustment after initial setup." into nyc-dev am: 3446a6ef am: f022f718" into nyc-mr1-dev-plus-aosp
parents cdd7f61c 1d488eb6
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -389,6 +389,8 @@ public final class ViewRootImpl implements ViewParent,
    /** Set to true once doDie() has been called. */
    private boolean mRemoved;

    private boolean mNeedsHwRendererSetup;

    /**
     * Consistency verifier for debugging purposes.
     */
@@ -915,6 +917,11 @@ public final class ViewRootImpl implements ViewParent,
                mWindowAttributes.surfaceInsets.set(
                        oldInsetLeft, oldInsetTop, oldInsetRight, oldInsetBottom);
                mWindowAttributes.hasManualSurfaceInsets = oldHasManualSurfaceInsets;
            } else if (mWindowAttributes.surfaceInsets.left != oldInsetLeft
                    || mWindowAttributes.surfaceInsets.top != oldInsetTop
                    || mWindowAttributes.surfaceInsets.right != oldInsetRight
                    || mWindowAttributes.surfaceInsets.bottom != oldInsetBottom) {
                mNeedsHwRendererSetup = true;
            }

            applyKeepScreenOnFlag(mWindowAttributes);
@@ -1959,9 +1966,11 @@ public final class ViewRootImpl implements ViewParent,
            if (hardwareRenderer != null && hardwareRenderer.isEnabled()) {
                if (hwInitialized
                        || mWidth != hardwareRenderer.getWidth()
                        || mHeight != hardwareRenderer.getHeight()) {
                        || mHeight != hardwareRenderer.getHeight()
                        || mNeedsHwRendererSetup) {
                    hardwareRenderer.setup(mWidth, mHeight, mAttachInfo,
                            mWindowAttributes.surfaceInsets);
                    mNeedsHwRendererSetup = false;
                }
            }