Skip to content

Commit e69f072

Browse files
cortinicofacebook-github-bot
authored andcommitted
Make EventDispatcherImpl internal (#52154)
Summary: Pull Request resolved: #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
1 parent 1ced97f commit e69f072

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4866,24 +4866,6 @@ public abstract interface class com/facebook/react/uimanager/events/EventDispatc
48664866
public abstract fun removeListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
48674867
}
48684868

4869-
public final class com/facebook/react/uimanager/events/EventDispatcherImpl : com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/uimanager/events/EventDispatcher {
4870-
public static final field Companion Lcom/facebook/react/uimanager/events/EventDispatcherImpl$Companion;
4871-
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
4872-
public fun addBatchEventDispatchedListener (Lcom/facebook/react/uimanager/events/BatchEventDispatchedListener;)V
4873-
public fun addListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
4874-
public fun dispatchAllEvents ()V
4875-
public fun dispatchEvent (Lcom/facebook/react/uimanager/events/Event;)V
4876-
public fun onCatalystInstanceDestroyed ()V
4877-
public fun onHostDestroy ()V
4878-
public fun onHostPause ()V
4879-
public fun onHostResume ()V
4880-
public fun removeBatchEventDispatchedListener (Lcom/facebook/react/uimanager/events/BatchEventDispatchedListener;)V
4881-
public fun removeListener (Lcom/facebook/react/uimanager/events/EventDispatcherListener;)V
4882-
}
4883-
4884-
public final class com/facebook/react/uimanager/events/EventDispatcherImpl$Companion {
4885-
}
4886-
48874869
public abstract interface class com/facebook/react/uimanager/events/EventDispatcherListener {
48884870
public abstract fun onEventDispatch (Lcom/facebook/react/uimanager/events/Event;)V
48894871
}

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicInteger
5151
* 0x0000ffff00000000 COALESCING_KEY_MASK = 0xffff000000000000
5252
*/
5353
@InteropLegacyArchitecture
54-
public class EventDispatcherImpl(private val reactContext: ReactApplicationContext) :
54+
internal class EventDispatcherImpl(private val reactContext: ReactApplicationContext) :
5555
EventDispatcher, LifecycleEventListener {
5656
private val eventsStagingLock = Any()
5757
private val eventsToDispatchLock = Any()
@@ -308,7 +308,7 @@ public class EventDispatcherImpl(private val reactContext: ReactApplicationConte
308308
eventsToDispatchSize = 0
309309
}
310310

311-
public companion object {
311+
companion object {
312312
private val EVENT_COMPARATOR: java.util.Comparator<Event<*>?> =
313313
java.util.Comparator { lhs, rhs ->
314314
when {

0 commit comments

Comments
 (0)