Fix wrong measurement in DecorView

am: ffd049027f

* commit 'ffd049027f1cb85c67353abefcf130c1474c261a':
  Fix wrong measurement in DecorView
This commit is contained in:
Jorim Jaggi
2016-02-24 00:40:25 +00:00
committed by android-build-merger

View File

@@ -585,14 +585,14 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
w = 0; w = 0;
} }
if (DEBUG_MEASURE) Log.d(mLogTag, "Fixed width: " + w); if (DEBUG_MEASURE) Log.d(mLogTag, "Fixed width: " + w);
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
if (w > 0) { if (w > 0) {
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
widthMeasureSpec = MeasureSpec.makeMeasureSpec( widthMeasureSpec = MeasureSpec.makeMeasureSpec(
Math.min(w, widthSize), EXACTLY); Math.min(w, widthSize), EXACTLY);
fixedWidth = true; fixedWidth = true;
} else { } else {
widthMeasureSpec = MeasureSpec.makeMeasureSpec( widthMeasureSpec = MeasureSpec.makeMeasureSpec(
widthMeasureSpec - mFloatingInsets.left - mFloatingInsets.right, widthSize - mFloatingInsets.left - mFloatingInsets.right,
AT_MOST); AT_MOST);
mApplyFloatingHorizontalInsets = true; mApplyFloatingHorizontalInsets = true;
} }