Make EventDispatcherImpl internal (#52154)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52154

I wasn't able to find any meaningful usage of `EventDispatcherImpl` in OSS, therefore I'm making this class internal.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77024759

fbshipit-source-id: e1ff3329cedf96a8c75edb9b9ccc1ce21adfab11
This commit is contained in:
Nicola Corti
2025-06-23 07:35:06 -07:00
committed by Facebook GitHub Bot
parent 1ced97fbe6
commit e69f0726cd
2 changed files with 2 additions and 20 deletions
@@ -4866,24 +4866,6 @@ public abstract interface class com/facebook/react/uimanager/events/EventDispatc
public abstract fun removeListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
}
public final class com/facebook/react/uimanager/events/EventDispatcherImpl : com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/uimanager/events/EventDispatcher {
public static final field Companion Lcom/facebook/react/uimanager/events/EventDispatcherImpl$Companion;
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
public fun addBatchEventDispatchedListener (Lcom/facebook/react/uimanager/events/BatchEventDispatchedListener;)V
public fun addListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
public fun dispatchAllEvents ()V
public fun dispatchEvent (Lcom/facebook/react/uimanager/events/Event;)V
public fun onCatalystInstanceDestroyed ()V
public fun onHostDestroy ()V
public fun onHostPause ()V
public fun onHostResume ()V
public fun removeBatchEventDispatchedListener (Lcom/facebook/react/uimanager/events/BatchEventDispatchedListener;)V
public fun removeListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
}
public final class com/facebook/react/uimanager/events/EventDispatcherImpl$Companion {
}
public abstract interface class com/facebook/react/uimanager/events/EventDispatcherListener {
public abstract fun onEventDispatch (Lcom/facebook/react/uimanager/events/Event;)V
}
@@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicInteger
* 0x0000ffff00000000 COALESCING_KEY_MASK = 0xffff000000000000
*/
@InteropLegacyArchitecture
public class EventDispatcherImpl(private val reactContext: ReactApplicationContext) :
internal class EventDispatcherImpl(private val reactContext: ReactApplicationContext) :
EventDispatcher, LifecycleEventListener {
private val eventsStagingLock = Any()
private val eventsToDispatchLock = Any()
@@ -308,7 +308,7 @@ public class EventDispatcherImpl(private val reactContext: ReactApplicationConte
eventsToDispatchSize = 0
}
public companion object {
companion object {
private val EVENT_COMPARATOR: java.util.Comparator<Event<*>?> =
java.util.Comparator { lhs, rhs ->
when {