TM: Create Java implementation of Turbo Modules

Summary: Create a Java implementation for a sample module

Reviewed By: fkgozali

Differential Revision: D9445981

fbshipit-source-id: 7709f7655468dc21abcc42cba1036b8e920b2bdb
This commit is contained in:
Ram N 2018-09-05 09:14:53 -07:00 committed by Facebook Github Bot
parent 66bd4992b8
commit 38bea0bbf3
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.CatalystInstanceImpl;
import com.facebook.react.bridge.JSBundleLoader;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.react.bridge.JSIModuleRegistry;
import com.facebook.react.bridge.JavaJSExecutor;
import com.facebook.react.bridge.JavaScriptExecutor;
import com.facebook.react.bridge.JavaScriptExecutorFactory;
@ -1018,6 +1019,7 @@ public class ReactInstanceManager {
Log.d(ReactConstants.TAG, "ReactInstanceManager.attachRootViewToInstance()");
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "attachRootViewToInstance");
UIManager uiManagerModule = UIManagerHelper.getUIManager(mCurrentReactContext, rootView.getUIManagerType());
final int rootTag = uiManagerModule.addRootView(rootView);
rootView.setRootViewTag(rootTag);
rootView.runApplication();