pass EventDispatcher to UIImplementation constructor

Summary: This way `UIImplementation` can hold on to it and use it outside of calls from the `UIManagerModule`.

Reviewed By: lexs

Differential Revision: D3899774

fbshipit-source-id: 01e4956c4540bcdf30774a3f40a625e934714ee9
This commit is contained in:
Felix Oghina 2016-10-04 12:21:03 -07:00 committed by Facebook Github Bot
parent 5eb28dc4f0
commit f7cbd56d8e
15 changed files with 82 additions and 65 deletions

View File

@ -16,24 +16,24 @@ import java.util.Set;
import com.facebook.react.bridge.BaseJavaModule;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.InvalidIteratorException;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NoSuchKeyException;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableType;
import com.facebook.react.bridge.ReadableNativeMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.bridge.UnexpectedNativeTypeException;
import com.facebook.react.bridge.ReadableNativeMap;
import com.facebook.react.bridge.ReadableType;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.UnexpectedNativeTypeException;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeMap;
import com.facebook.react.modules.systeminfo.AndroidInfoModule;
import com.facebook.react.testing.FakeWebSocketModule;
import com.facebook.react.testing.ReactIntegrationTestCase;
import com.facebook.react.testing.ReactTestHelper;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.view.ReactViewManager;
@ -79,7 +79,7 @@ public class CatalystNativeJSToJavaParametersTestCase extends ReactIntegrationTe
final UIManagerModule mUIManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override

View File

@ -14,16 +14,16 @@ import java.util.List;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.ObjectAlreadyConsumedException;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeArray;
import com.facebook.react.bridge.WritableNativeMap;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.testing.AssertModule;
import com.facebook.react.testing.FakeWebSocketModule;
import com.facebook.react.testing.ReactIntegrationTestCase;
import com.facebook.react.testing.ReactTestHelper;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.view.ReactViewManager;
@ -62,7 +62,7 @@ public class CatalystNativeJavaToJSArgumentsTestCase extends ReactIntegrationTes
final UIManagerModule mUIManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override

View File

@ -24,6 +24,7 @@ import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.modules.systeminfo.AndroidInfoModule;
import com.facebook.react.uimanager.PixelUtil;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.text.ReactRawTextManager;
@ -81,7 +82,7 @@ public class CatalystUIManagerTestCase extends ReactIntegrationTestCase {
uiManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
public void run() {

View File

@ -18,7 +18,7 @@ import com.facebook.react.testing.StringRecordingModule;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.view.ReactViewManager;
@ -46,7 +46,7 @@ public class JSLocaleTest extends ReactIntegrationTestCase {
final UIManagerModule mUIManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override

View File

@ -26,6 +26,7 @@ import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.modules.systeminfo.AndroidInfoModule;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.progressbar.ReactProgressBarViewManager;
@ -71,7 +72,7 @@ public class ProgressBarTestCase extends ReactIntegrationTestCase {
mUIManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override

View File

@ -22,6 +22,7 @@ import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.modules.systeminfo.AndroidInfoModule;
import com.facebook.react.uimanager.PixelUtil;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.views.view.ReactViewGroup;
@ -52,7 +53,7 @@ public class ViewRenderingTestCase extends ReactIntegrationTestCase {
final UIManagerModule uiManager = new UIManagerModule(
getContext(),
viewManagers,
new UIImplementation(getContext(), viewManagers));
new UIImplementationProvider());
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override

View File

@ -202,9 +202,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_UI_MANAGER_M
return new UIManagerModule(
reactContext,
viewManagersList,
mUIImplementationProvider.createUIImplementation(
reactContext,
viewManagersList));
mUIImplementationProvider);
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_END);

View File

@ -45,31 +45,41 @@ public class UIImplementation {
private final NativeViewHierarchyOptimizer mNativeViewHierarchyOptimizer;
private final int[] mMeasureBuffer = new int[4];
private final ReactApplicationContext mReactContext;
protected final EventDispatcher mEventDispatcher;
private double mLayoutCount = 0.0;
private double mLayoutTimer = 0.0;
public UIImplementation(ReactApplicationContext reactContext, List<ViewManager> viewManagers) {
this(reactContext, new ViewManagerRegistry(viewManagers));
public UIImplementation(
ReactApplicationContext reactContext,
List<ViewManager> viewManagers,
EventDispatcher eventDispatcher) {
this(reactContext, new ViewManagerRegistry(viewManagers), eventDispatcher);
}
private UIImplementation(ReactApplicationContext reactContext, ViewManagerRegistry viewManagers) {
private UIImplementation(
ReactApplicationContext reactContext,
ViewManagerRegistry viewManagers,
EventDispatcher eventDispatcher) {
this(
reactContext,
viewManagers,
new UIViewOperationQueue(reactContext, new NativeViewHierarchyManager(viewManagers)));
new UIViewOperationQueue(reactContext, new NativeViewHierarchyManager(viewManagers)),
eventDispatcher);
}
protected UIImplementation(
ReactApplicationContext reactContext,
ViewManagerRegistry viewManagers,
UIViewOperationQueue operationsQueue) {
UIViewOperationQueue operationsQueue,
EventDispatcher eventDispatcher) {
mReactContext = reactContext;
mViewManagers = viewManagers;
mOperationsQueue = operationsQueue;
mNativeViewHierarchyOptimizer = new NativeViewHierarchyOptimizer(
mOperationsQueue,
mShadowNodeRegistry);
mEventDispatcher = eventDispatcher;
}
protected ReactShadowNode createRootShadowNode() {
@ -136,8 +146,7 @@ public class UIImplementation {
public void updateNodeSize(
int nodeViewTag,
int newWidth,
int newHeight,
EventDispatcher eventDispatcher) {
int newHeight) {
ReactShadowNode cssNode = mShadowNodeRegistry.getNode(nodeViewTag);
cssNode.setStyleWidth(newWidth);
cssNode.setStyleHeight(newHeight);
@ -146,7 +155,7 @@ public class UIImplementation {
// the batch. As all batches are executed as a single runnable on the event queue this should
// always be empty, but that calling architecture is an implementation detail.
if (mOperationsQueue.isEmpty()) {
dispatchViewUpdates(eventDispatcher, -1); // -1 = no associated batch id
dispatchViewUpdates(-1); // -1 = no associated batch id
}
}
@ -515,20 +524,20 @@ public class UIImplementation {
/**
* Invoked at the end of the transaction to commit any updates to the node hierarchy.
*/
public void dispatchViewUpdates(EventDispatcher eventDispatcher, int batchId) {
updateViewHierarchy(eventDispatcher);
public void dispatchViewUpdates(int batchId) {
updateViewHierarchy();
mNativeViewHierarchyOptimizer.onBatchComplete();
mOperationsQueue.dispatchViewUpdates(batchId);
}
protected void updateViewHierarchy(EventDispatcher eventDispatcher) {
protected void updateViewHierarchy() {
for (int i = 0; i < mShadowNodeRegistry.getRootNodeCount(); i++) {
int tag = mShadowNodeRegistry.getRootTag(i);
ReactShadowNode cssRoot = mShadowNodeRegistry.getNode(tag);
notifyOnBeforeLayoutRecursive(cssRoot);
calculateRootLayout(cssRoot);
applyUpdatesRecursive(cssRoot, 0f, 0f, eventDispatcher);
applyUpdatesRecursive(cssRoot, 0f, 0f);
}
}
@ -764,8 +773,7 @@ public class UIImplementation {
protected void applyUpdatesRecursive(
ReactShadowNode cssNode,
float absoluteX,
float absoluteY,
EventDispatcher eventDispatcher) {
float absoluteY) {
if (!cssNode.hasUpdates()) {
return;
}
@ -775,8 +783,7 @@ public class UIImplementation {
applyUpdatesRecursive(
cssNode.getChildAt(i),
absoluteX + cssNode.getLayoutX(),
absoluteY + cssNode.getLayoutY(),
eventDispatcher);
absoluteY + cssNode.getLayoutY());
}
}
@ -790,7 +797,7 @@ public class UIImplementation {
// notify JS about layout event if requested
if (cssNode.shouldNotifyOnLayout()) {
eventDispatcher.dispatchEvent(
mEventDispatcher.dispatchEvent(
OnLayoutEvent.obtain(
tag,
cssNode.getScreenX(),

View File

@ -11,6 +11,7 @@ package com.facebook.react.uimanager;
import java.util.List;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.events.EventDispatcher;
/**
* Provides UIImplementation to use in {@link UIManagerModule}.
@ -18,7 +19,8 @@ import com.facebook.react.bridge.ReactApplicationContext;
public class UIImplementationProvider {
public UIImplementation createUIImplementation(
ReactApplicationContext reactContext,
List<ViewManager> viewManagers) {
return new UIImplementation(reactContext, viewManagers);
List<ViewManager> viewManagers,
EventDispatcher eventDispatcher) {
return new UIImplementation(reactContext, viewManagers, eventDispatcher);
}
}

View File

@ -85,12 +85,13 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
public UIManagerModule(
ReactApplicationContext reactContext,
List<ViewManager> viewManagerList,
UIImplementation uiImplementation) {
UIImplementationProvider uiImplementationProvider) {
super(reactContext);
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(reactContext);
mEventDispatcher = new EventDispatcher(reactContext);
mModuleConstants = createConstants(viewManagerList);
mUIImplementation = uiImplementation;
mUIImplementation = uiImplementationProvider
.createUIImplementation(reactContext, viewManagerList, mEventDispatcher);
reactContext.addLifecycleEventListener(this);
}
@ -209,7 +210,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
public void updateNodeSize(int nodeViewTag, int newWidth, int newHeight) {
getReactApplicationContext().assertOnNativeModulesQueueThread();
mUIImplementation.updateNodeSize(nodeViewTag, newWidth, newHeight, mEventDispatcher);
mUIImplementation.updateNodeSize(nodeViewTag, newWidth, newHeight);
}
@ReactMethod
@ -496,7 +497,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
.arg("BatchId", batchId)
.flush();
try {
mUIImplementation.dispatchViewUpdates(mEventDispatcher, batchId);
mUIImplementation.dispatchViewUpdates(batchId);
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}

View File

@ -25,10 +25,10 @@ import com.facebook.react.uimanager.annotations.ReactPropGroup;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.rule.PowerMockRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.fest.assertions.api.Assertions.fail;
@ -148,7 +148,7 @@ public class ReactPropConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
reactContext,
viewManagers,
new UIImplementation(reactContext, viewManagers));
new UIImplementationProvider());
Map<String, String> constants =
(Map) valueAtPath(uiManagerModule.getConstants(), "SomeView", "NativeProps");
assertThat(constants).isEqualTo(

View File

@ -15,6 +15,7 @@ import java.util.Map;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.events.EventDispatcher;
import org.fest.assertions.data.MapEntry;
import org.junit.Before;
@ -27,6 +28,7 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -50,12 +52,17 @@ public class UIManagerModuleConstantsTest {
private static final Map TWIRL_DIRECT_EVENT_MAP = MapBuilder.of("registrationName", "onTwirl");
private ReactApplicationContext mReactContext;
private UIImplementation mUIImplementation;
private UIImplementationProvider mUIImplementationProvider;
@Before
public void setUp() {
mReactContext = new ReactApplicationContext(RuntimeEnvironment.application);
mUIImplementation = mock(UIImplementation.class);
mUIImplementationProvider = mock(UIImplementationProvider.class);
when(mUIImplementationProvider.createUIImplementation(
any(ReactApplicationContext.class),
any(List.class),
any(EventDispatcher.class)))
.thenReturn(mock(UIImplementation.class));
}
@Test
@ -64,7 +71,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat(constants)
.containsKey(CUSTOM_BUBBLING_EVENT_TYPES)
@ -81,7 +88,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat((Map) constants.get(CUSTOM_BUBBLING_EVENT_TYPES))
.contains(MapEntry.entry("onTwirl", TWIRL_BUBBLING_EVENT_MAP))
@ -97,7 +104,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat((Map) constants.get(CUSTOM_DIRECT_EVENT_TYPES))
.contains(MapEntry.entry("onTwirl", TWIRL_DIRECT_EVENT_MAP))
@ -114,7 +121,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat(constants).containsKey("RedPandaPhotoOfTheDayView");
assertThat((Map) constants.get("RedPandaPhotoOfTheDayView")).containsKey("Constants");
@ -132,7 +139,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat((String) valueAtPath(constants, "SomeView", "NativeProps", "fooProp"))
.isEqualTo("number");
@ -166,7 +173,7 @@ public class UIManagerModuleConstantsTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
mUIImplementation);
mUIImplementationProvider);
Map<String, Object> constants = uiManagerModule.getConstants();
assertThat((Map) constants.get(CUSTOM_DIRECT_EVENT_TYPES)).containsKey("onTwirl");

View File

@ -22,28 +22,28 @@ import android.widget.TextView;
import com.facebook.react.ReactRootView;
import com.facebook.react.animation.Animation;
import com.facebook.react.animation.AnimationPropertyUpdater;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.JavaOnlyArray;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.views.text.ReactRawTextManager;
import com.facebook.react.views.text.ReactTextShadowNode;
import com.facebook.react.views.text.ReactTextViewManager;
import com.facebook.react.views.view.ReactViewGroup;
import com.facebook.react.views.view.ReactViewManager;
import com.facebook.react.bridge.ReactTestHelper;
import org.junit.Before;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.rule.PowerMockRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
@ -110,7 +110,6 @@ public class UIManagerModuleTest {
UIManagerModule uiManagerModuleMock = mock(UIManagerModule.class);
when(mCatalystInstanceMock.getNativeModule(UIManagerModule.class))
.thenReturn(uiManagerModuleMock);
}
@Test
@ -644,7 +643,7 @@ public class UIManagerModuleTest {
executePendingChoreographerCallbacks();
assertThat(rootView.getChildCount()).isEqualTo(2);
assertThat(((ViewGroup)rootView.getChildAt(0)).getChildCount()).isEqualTo(2);
assertThat(((ViewGroup) rootView.getChildAt(0)).getChildCount()).isEqualTo(2);
uiManager.removeSubviewsFromContainerWithID(containerTag);
@ -652,7 +651,7 @@ public class UIManagerModuleTest {
executePendingChoreographerCallbacks();
assertThat(rootView.getChildCount()).isEqualTo(2);
assertThat(((ViewGroup)rootView.getChildAt(0)).getChildCount()).isEqualTo(0);
assertThat(((ViewGroup) rootView.getChildAt(0)).getChildCount()).isEqualTo(0);
}
/**
@ -821,7 +820,7 @@ public class UIManagerModuleTest {
UIManagerModule uiManagerModule = new UIManagerModule(
mReactContext,
viewManagers,
new UIImplementation(mReactContext, viewManagers));
new UIImplementationProvider());
uiManagerModule.onHostResume();
return uiManagerModule;
}

View File

@ -16,7 +16,6 @@ import java.util.List;
import android.annotation.TargetApi;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.Spanned;
@ -34,7 +33,7 @@ import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.uimanager.ReactChoreographer;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.uimanager.ViewProps;
@ -121,7 +120,7 @@ public class ReactTextTest {
JavaOnlyMap.of(ReactTextShadowNode.PROP_TEXT, "test text"));
CustomStyleSpan customStyleSpan =
getSingleSpan((TextView)rootView.getChildAt(0), CustomStyleSpan.class);
getSingleSpan((TextView) rootView.getChildAt(0), CustomStyleSpan.class);
assertThat(customStyleSpan.getWeight() & Typeface.BOLD).isNotZero();
assertThat(customStyleSpan.getStyle() & Typeface.ITALIC).isZero();
}
@ -435,7 +434,7 @@ public class ReactTextTest {
UIManagerModule uiManagerModule = new UIManagerModule(
reactContext,
viewManagers,
new UIImplementation(reactContext, viewManagers));
new UIImplementationProvider());
uiManagerModule.onHostResume();
return uiManagerModule;
}

View File

@ -24,6 +24,7 @@ import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.uimanager.ReactChoreographer;
import com.facebook.react.uimanager.UIImplementation;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.uimanager.ViewProps;
@ -185,7 +186,7 @@ public class TextInputTest {
UIManagerModule uiManagerModule = new UIManagerModule(
reactContext,
viewManagers,
new UIImplementation(reactContext, viewManagers));
new UIImplementationProvider());
uiManagerModule.onHostResume();
return uiManagerModule;
}