mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Refactor ReactNativeHost to add UIManagerProvider (#41383)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41383 Refactor `ReactNativeHost` to add the APIs for `UIManagerProvider`. Reviewed By: christophpurrer, philIip Differential Revision: D51120159 fbshipit-source-id: 3d9b384e3fb2f5420c5ea28f43c4147a1425d137
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ea622de4e1
commit
153a2641b4
+6
@@ -14,6 +14,7 @@ import com.facebook.react.bridge.JSIModulePackage;
|
||||
import com.facebook.react.bridge.JavaScriptExecutorFactory;
|
||||
import com.facebook.react.bridge.ReactMarker;
|
||||
import com.facebook.react.bridge.ReactMarkerConstants;
|
||||
import com.facebook.react.bridge.UIManagerProvider;
|
||||
import com.facebook.react.common.LifecycleState;
|
||||
import com.facebook.react.common.SurfaceDelegate;
|
||||
import com.facebook.react.common.SurfaceDelegateFactory;
|
||||
@@ -85,6 +86,7 @@ public abstract class ReactNativeHost {
|
||||
.setRedBoxHandler(getRedBoxHandler())
|
||||
.setJavaScriptExecutorFactory(getJavaScriptExecutorFactory())
|
||||
.setJSIModulesPackage(getJSIModulePackage())
|
||||
.setUIManagerProvider(getUIManagerProvider())
|
||||
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
|
||||
.setReactPackageTurboModuleManagerDelegateBuilder(
|
||||
getReactPackageTurboModuleManagerDelegateBuilder())
|
||||
@@ -129,6 +131,10 @@ public abstract class ReactNativeHost {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected @Nullable UIManagerProvider getUIManagerProvider() {
|
||||
return reactApplicationContext -> null;
|
||||
}
|
||||
|
||||
/** Returns whether or not to treat it as normal if Activity is null. */
|
||||
public boolean getShouldRequireActivity() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user