Merge "Fix ViewRoot inset adjustment after initial setup." into nyc-dev am: 3446a6ef71

am: f022f71888

* commit 'f022f718882c3f8ccd8ab02b240ba9b9f7ffadb0':
  Fix ViewRoot inset adjustment after initial setup.

Change-Id: I6d9968c38758112e5ad0679ffde178081c456500
This commit is contained in:
Robert Carr
2016-04-29 20:41:44 +00:00
committed by android-build-merger

View File

@@ -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;
}
}