diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java index 02bbf705f78209..ed507ea33e7db4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java @@ -7,10 +7,8 @@ package com.facebook.react.fabric; -import androidx.annotation.Nullable; import com.facebook.infer.annotation.Nullsafe; import com.facebook.react.bridge.CatalystInstance; -import com.facebook.react.bridge.JSIModuleProvider; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.UIManager; import com.facebook.react.bridge.UIManagerProvider; @@ -19,45 +17,21 @@ import com.facebook.systrace.Systrace; @Nullsafe(Nullsafe.Mode.LOCAL) -public class FabricUIManagerProviderImpl - implements JSIModuleProvider, UIManagerProvider { +public class FabricUIManagerProviderImpl implements UIManagerProvider { - private final @Nullable ReactApplicationContext mReactApplicationContext; private final ComponentFactory mComponentFactory; private final ReactNativeConfig mConfig; private final ViewManagerRegistry mViewManagerRegistry; public FabricUIManagerProviderImpl( - ReactApplicationContext reactApplicationContext, ComponentFactory componentFactory, ReactNativeConfig config, ViewManagerRegistry viewManagerRegistry) { - mReactApplicationContext = reactApplicationContext; mComponentFactory = componentFactory; mConfig = config; mViewManagerRegistry = viewManagerRegistry; } - public FabricUIManagerProviderImpl( - ComponentFactory componentFactory, - ReactNativeConfig config, - ViewManagerRegistry viewManagerRegistry) { - mReactApplicationContext = null; - mComponentFactory = componentFactory; - mConfig = config; - mViewManagerRegistry = viewManagerRegistry; - } - - @Override - public UIManager get() { - if (mReactApplicationContext != null) { - return createUIManager(mReactApplicationContext); - } - throw new IllegalStateException( - "This method shoulndn't be called without ReactContext initialized"); - } - - @Override public UIManager createUIManager(ReactApplicationContext reactApplicationContext) { Systrace.beginSection( Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricUIManagerProviderImpl.create");