Remove ReactRootView's MeasureSpec assertion

Reviewed By: AaaChiuuu

Differential Revision: D3854737

fbshipit-source-id: d72975e49875049ed4411258e9a449b394ca7ece
This commit is contained in:
Andrew Y. Chen
2016-09-13 09:33:43 -07:00
committed by Facebook Github Bot 0
parent 6f75591620
commit df83f05737

View File

@@ -80,16 +80,6 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
if (widthMode == MeasureSpec.UNSPECIFIED || heightMode == MeasureSpec.UNSPECIFIED) {
throw new IllegalStateException(
"The root catalyst view must have a width and height given to it by it's parent view. " +
"You can do this by specifying MATCH_PARENT or explicit width and height in the " +
"layout. widthMode=" + widthMode + ", heightMode=" + heightMode);
}
setMeasuredDimension(
MeasureSpec.getSize(widthMeasureSpec),
MeasureSpec.getSize(heightMeasureSpec));