public void dispatchEvent(Event event){
  Assertions.assertCondition(event.isInitialized(),"Dispatched event hasn't been initialized");
  boolean eventHandled=false;
  for (  EventDispatcherListener listener : mListeners) {
    if (listener.onEventDispatch(event)) {
      eventHandled=true;
    }
  }
  if (eventHandled) {
    return;
  }
synchronized (mEventsStagingLock) {
    mEventStaging.add(event);
    Systrace.startAsyncFlow(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,event.getEventName(),event.getUniqueID());
  }
  if (mRCTEventEmitter != null) {
    mCurrentFrameCallback.maybePostFromNonUI();
  }
 else {
  }
}

public void dispatchEvent ( Event event ) { Assertions . assertCondition ( event . isInitialized ( ) , "Dispatched event hasn't been initialized" ) ; boolean eventHandled = false ; for ( EventDispatcherListener listener : mListeners ) { if ( listener . onEventDispatch ( event ) ) { eventHandled = true ; } } if ( eventHandled ) { return ; } synchronized ( mEventsStagingLock ) { mEventStaging . add ( event ) ; Systrace . startAsyncFlow ( Systrace . TRACE_TAG_REACT_JAVA_BRIDGE , event . getEventName ( ) , event . getUniqueID ( ) ) ; } if ( mRCTEventEmitter != null ) { mCurrentFrameCallback . maybePostFromNonUI ( ) ; } else { } }
sends the given event to js , coalescing eligible events if js is backed up .
