Fix wrong measurement in DecorView
Bug: 27215338 Change-Id: I512df9b23788daf485b020a2199a55a7c6ab6311
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user