Pass surface insets from window attributes rather than params

Params only gets set in certain situations, whereas the actual window
attributes always contain the correct surface insets.

BUG: 18214798
Change-Id: Ib5236ccf3f120b26c5abc8671bf29cb3dc269186
This commit is contained in:
Alan Viverette
2014-11-04 11:27:19 -08:00
parent 6f7fd0ba50
commit 93cad8c4d4

View File

@@ -1746,8 +1746,8 @@ public final class ViewRootImpl implements ViewParent,
if (hwInitialized ||
mWidth != mAttachInfo.mHardwareRenderer.getWidth() ||
mHeight != mAttachInfo.mHardwareRenderer.getHeight()) {
final Rect surfaceInsets = params != null ? params.surfaceInsets : null;
mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight, surfaceInsets);
mAttachInfo.mHardwareRenderer.setup(
mWidth, mHeight, mWindowAttributes.surfaceInsets);
if (!hwInitialized) {
mAttachInfo.mHardwareRenderer.invalidate(mSurface);
mFullRedrawNeeded = true;