Refactor setup of Event Dispatcher

Reviewed By: achen1

Differential Revision: D7746311

fbshipit-source-id: cfee1c2ced6d85477628085f3260496e80ae48c2
This commit is contained in:
David Vacca
2018-05-30 21:48:52 -07:00
committed by Facebook Github Bot
parent e61341ba32
commit 58ea20b5e8
9 changed files with 126 additions and 50 deletions

View File

@@ -82,6 +82,7 @@ import com.facebook.react.uimanager.DisplayMetricsHolder;
import com.facebook.react.uimanager.UIImplementationProvider;
import com.facebook.react.uimanager.UIManagerHelper;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper;
import com.facebook.soloader.SoLoader;
import com.facebook.systrace.Systrace;
@@ -1077,6 +1078,8 @@ public class ReactInstanceManager {
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START, jsExecutor.getName());
final ReactApplicationContext reactContext = new ReactApplicationContext(mApplicationContext);
reactContext.setEventDispatcher(new EventDispatcher(reactContext));
NativeModuleCallExceptionHandler exceptionHandler = mNativeModuleCallExceptionHandler != null
? mNativeModuleCallExceptionHandler
: mDevSupportManager;