Stop hard-coding ReactModuleInfo constructor args

Summary:
We're going to migrate our NativeModules to the TurboModule system soon. Therefore, it's no longer safe to assume that all NativeModules are not TurboModules. Also, it's not a good idea to hard-code this stuff if we can calculate the correct values on the fly.

Changelog:
[Internal]

Reviewed By: PeteTheHeat

Differential Revision: D18980859

fbshipit-source-id: 399a75a72d7f57998b217502ff79d7d911cc5a1c
This commit is contained in:
Ramanpreet Nara
2019-12-13 16:08:58 -08:00
committed by Facebook Github Bot
parent aff6bad27c
commit 50999b1cf2
3 changed files with 5 additions and 2 deletions
@@ -41,6 +41,7 @@ import com.facebook.react.modules.timepicker.TimePickerDialogModule;
import com.facebook.react.modules.toast.ToastModule;
import com.facebook.react.modules.vibration.VibrationModule;
import com.facebook.react.modules.websocket.WebSocketModule;
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.art.ARTRenderableViewManager;
import com.facebook.react.views.art.ARTSurfaceViewManager;
@@ -255,7 +256,7 @@ public class MainReactPackage extends TurboReactPackage {
reactModule.needsEagerInit(),
reactModule.hasConstants(),
reactModule.isCxxModule(),
false));
TurboModule.class.isAssignableFrom(moduleClass)));
}
return new ReactModuleInfoProvider() {