mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Create JNI wrapper for Fabric
Reviewed By: fkgozali Differential Revision: D6989838 fbshipit-source-id: f092901cacc0c3eb89b08c6ac0384c4d5f6e6cfe
This commit is contained in:
committed by
Facebook Github Bot
parent
59401f89c1
commit
c82b9f72de
@@ -352,12 +352,17 @@ public class ReactInstanceManager {
|
||||
|
||||
Assertions.assertNotNull(catalystInstance, "CatalystInstance null after hasStartedCreatingInitialContext true.");
|
||||
|
||||
final ReactApplicationContext reactContext = new ReactApplicationContext(mApplicationContext);
|
||||
final ReactApplicationContext reactContext = getReactApplicationContext();
|
||||
|
||||
NativeModuleRegistry nativeModuleRegistry = processPackages(reactContext, packages, true);
|
||||
catalystInstance.extendNativeModules(nativeModuleRegistry);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public @Nullable ReactApplicationContext getReactApplicationContext() {
|
||||
return new ReactApplicationContext(mApplicationContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recreate the react application and context. This should be called if configuration has changed
|
||||
* or the developer has requested the app to be reloaded. It should only be called after an
|
||||
@@ -1088,7 +1093,7 @@ public class ReactInstanceManager {
|
||||
JSBundleLoader jsBundleLoader) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.createReactContext()");
|
||||
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START);
|
||||
final ReactApplicationContext reactContext = new ReactApplicationContext(mApplicationContext);
|
||||
final ReactApplicationContext reactContext = getReactApplicationContext();
|
||||
|
||||
if (mUseDeveloperSupport) {
|
||||
reactContext.setNativeModuleCallExceptionHandler(mDevSupportManager);
|
||||
|
||||
@@ -11,20 +11,10 @@ android_library(
|
||||
"PUBLIC",
|
||||
],
|
||||
deps = [
|
||||
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
|
||||
react_native_dep("libraries/fresco/fresco-react-native:fbcore"),
|
||||
react_native_dep("libraries/fresco/fresco-react-native:fresco-drawee"),
|
||||
react_native_dep("libraries/fresco/fresco-react-native:fresco-react-native"),
|
||||
react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"),
|
||||
react_native_dep("libraries/textlayoutbuilder:textlayoutbuilder"),
|
||||
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
react_native_target("java/com/facebook/react:reactAndroid"),
|
||||
react_native_target("java/com/facebook/react/bridge:bridgeAndroid"),
|
||||
react_native_target("java/com/facebook/react/common:commonAndroid"),
|
||||
react_native_target("java/com/facebook/react/devsupport:devsupportAndroid"),
|
||||
react_native_target("java/com/facebook/react/modules/core:coreAndroid"),
|
||||
react_native_target("java/com/facebook/react/shell:shellAndroid"),
|
||||
react_native_target("java/com/facebook/react/uimanager:uimanagerAndroid"),
|
||||
react_native_target("java/com/facebook/react/uimanager/annotations:annotationsAndroid"),
|
||||
react_native_target("java/com/facebook/react/module/annotations:annotationsAndroid"),
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.facebook.react.fabric;
|
||||
|
||||
public interface FabricBinding {
|
||||
|
||||
void installFabric(Object jsContext, FabricUIManagerModule fabricModule);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user