mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Split EventDispatcher into interface and impl (#28983)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/28983 Creating an interface for EventDispatcher so I can implement it from a dummy/no-op EventDispatcher to use in bridgeless mode when the instance isn't alive. Changelog: [Android] [Changed] Renamed EventDispatcher to EventDispatcherImpl and created EventDispatcher interface; calls to EventDispatcher contstructor need to be updated Reviewed By: makovkastar Differential Revision: D21695401 fbshipit-source-id: 46066a467efcf03a5f484bb9fb58c662d46a2c4e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ae7df2df22
commit
68c0eddb71
@@ -43,6 +43,7 @@ import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.common.ViewUtil;
|
||||
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
|
||||
import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
import com.facebook.react.uimanager.events.EventDispatcherImpl;
|
||||
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
||||
import com.facebook.systrace.Systrace;
|
||||
import com.facebook.systrace.SystraceMessage;
|
||||
@@ -156,7 +157,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
int minTimeLeftInFrameForNonBatchedOperationMs) {
|
||||
super(reactContext);
|
||||
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(reactContext);
|
||||
mEventDispatcher = new EventDispatcher(reactContext);
|
||||
mEventDispatcher = new EventDispatcherImpl(reactContext);
|
||||
mModuleConstants = createConstants(viewManagerResolver);
|
||||
mCustomDirectEvents = UIManagerModuleConstants.getDirectEventTypeConstants();
|
||||
mViewManagerRegistry = new ViewManagerRegistry(viewManagerResolver);
|
||||
@@ -178,7 +179,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
int minTimeLeftInFrameForNonBatchedOperationMs) {
|
||||
super(reactContext);
|
||||
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(reactContext);
|
||||
mEventDispatcher = new EventDispatcher(reactContext);
|
||||
mEventDispatcher = new EventDispatcherImpl(reactContext);
|
||||
mCustomDirectEvents = MapBuilder.newHashMap();
|
||||
mModuleConstants = createConstants(viewManagersList, null, mCustomDirectEvents);
|
||||
mViewManagerRegistry = new ViewManagerRegistry(viewManagersList);
|
||||
|
||||
Reference in New Issue
Block a user