From 3ac7a4d6ba4e784f1935f4bfc6cf470781ffc943 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 9 Dec 2020 20:57:01 -0800 Subject: [PATCH] Prevent ReactRootView to load UIManagerModule when running with Fabric Enabled Summary: Prevent ReactRootView to load UIManagerModule when running with Fabric Enabled changelog: [Internal] Reviewed By: ejanzer Differential Revision: D25453879 fbshipit-source-id: 98e88db17a86ae60e14efb070df9b2da082ae127 --- .../src/main/java/com/facebook/react/ReactRootView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java index bac18eed25e..f9a8f3d83cb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java @@ -52,7 +52,6 @@ import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.ReactRoot; import com.facebook.react.uimanager.RootView; import com.facebook.react.uimanager.UIManagerHelper; -import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.common.UIManagerType; import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.systrace.Systrace; @@ -191,7 +190,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot { return; } ReactContext reactContext = mReactInstanceManager.getCurrentReactContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); + UIManager uiManager = UIManagerHelper.getUIManager(reactContext, getUIManagerType()); if (uiManager != null) { EventDispatcher eventDispatcher = uiManager.getEventDispatcher(); @@ -279,7 +278,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot { return; } ReactContext reactContext = mReactInstanceManager.getCurrentReactContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); + UIManager uiManager = UIManagerHelper.getUIManager(reactContext, getUIManagerType()); if (uiManager != null) { EventDispatcher eventDispatcher = uiManager.getEventDispatcher();