diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java index 646438e76..70e66c293 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java @@ -125,6 +125,14 @@ public class EventDispatcher implements LifecycleEventListener { event.getEventName(), event.getUniqueID()); } + maybePostFrameCallbackFromNonUI(); + } + + public void dispatchAllEvents() { + maybePostFrameCallbackFromNonUI(); + } + + private void maybePostFrameCallbackFromNonUI() { if (mReactEventEmitter != null) { // If the host activity is paused, the frame callback may not be currently // posted. Ensure that it is so that this event gets delivered promptly. @@ -137,10 +145,6 @@ public class EventDispatcher implements LifecycleEventListener { } } - public void dispatchAllEvents() { - mCurrentFrameCallback.maybePostFromNonUI(); - } - /** * Add a listener to this EventDispatcher. */