Remove ReactRootView's MeasureSpec assertion

Reviewed By: astreet

Differential Revision: D3811226

fbshipit-source-id: 611e5a2960928c19d93823616d68aa11a9786bf6
This commit is contained in:
Andrew Y. Chen 2016-09-06 12:36:59 -07:00 committed by Facebook Github Bot 4
parent 4f89fa9cf3
commit 300cb03e94
1 changed files with 1 additions and 13 deletions

View File

@ -80,19 +80,7 @@ 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));
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
mWasMeasured = true;
// Check if we were waiting for onMeasure to attach the root view