Fix wrong measurement in DecorView am: ffd049027f

am: c907ce46db

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

View File

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