Remove unused internal UIManagerModuleListener (#53404)

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

This interface is part of Legacy Architecture. No one is using it either internally or externally,
so it's safe to remove now. Interface was also `internal` so this is not a breaking change.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80714721

fbshipit-source-id: 82cc6152af7d7980119d2eda704ae50d8e81fd2b
This commit is contained in:
Nicola Corti
2025-08-21 12:25:38 -07:00
committed by Facebook GitHub Bot
parent 191ddc1ec7
commit fb114da8a4
3 changed files with 0 additions and 41 deletions
@@ -4362,7 +4362,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
public fun addRootView (Landroid/view/View;Lcom/facebook/react/bridge/WritableMap;)I
public fun addUIBlock (Lcom/facebook/react/uimanager/UIBlock;)V
public fun addUIManagerEventListener (Lcom/facebook/react/bridge/UIManagerListener;)V
public fun addUIManagerListener (Lcom/facebook/react/uimanager/UIManagerModuleListener;)V
public fun clearJSResponder ()V
public fun configureNextLayoutAnimation (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
public static fun createConstants (Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
@@ -4399,7 +4398,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
public fun receiveEvent (ILjava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V
public fun removeRootView (I)V
public fun removeUIManagerEventListener (Lcom/facebook/react/bridge/UIManagerListener;)V
public fun removeUIManagerListener (Lcom/facebook/react/uimanager/UIManagerModuleListener;)V
public fun resolveCustomDirectEventName (Ljava/lang/String;)Ljava/lang/String;
public fun resolveRootTagFromReactTag (I)I
public fun resolveView (I)Landroid/view/View;
@@ -52,7 +52,6 @@ import com.facebook.react.uimanager.events.RCTEventEmitter;
import com.facebook.react.uimanager.internal.LegacyArchitectureShadowNodeLogger;
import com.facebook.systrace.Systrace;
import com.facebook.systrace.SystraceMessage;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -117,7 +116,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
private final ViewManagerRegistry mViewManagerRegistry;
private final UIImplementation mUIImplementation;
private final MemoryTrimCallback mMemoryTrimCallback = new MemoryTrimCallback();
private final List<UIManagerModuleListener> mListeners = new ArrayList<>();
private final CopyOnWriteArrayList<UIManagerListener> mUIManagerListeners =
new CopyOnWriteArrayList<>();
@@ -687,9 +685,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
SystraceMessage.beginSection(Systrace.TRACE_TAG_REACT, "onBatchCompleteUI")
.arg("BatchId", batchId)
.flush();
for (UIManagerModuleListener listener : mListeners) {
listener.willDispatchViewUpdates(this);
}
for (UIManagerListener listener : mUIManagerListeners) {
listener.willDispatchViewUpdates(this);
}
@@ -757,16 +752,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
mUIImplementation.prependUIBlock(block);
}
@Deprecated
public void addUIManagerListener(UIManagerModuleListener listener) {
mListeners.add(listener);
}
@Deprecated
public void removeUIManagerListener(UIManagerModuleListener listener) {
mListeners.remove(listener);
}
public void addUIManagerEventListener(UIManagerListener listener) {
mUIManagerListeners.add(listener);
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@file:Suppress("DEPRECATION")
package com.facebook.react.uimanager
import com.facebook.react.common.annotations.internal.LegacyArchitecture
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
/** Listener used to hook into the UIManager update process. */
@Deprecated("Use UIManagerListener instead. This will be deleted in some future release.")
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
internal interface UIManagerModuleListener {
/**
* Called right before view updates are dispatched at the end of a batch. This is useful if a
* module needs to add UIBlocks to the queue before it is flushed.
*/
fun willDispatchViewUpdates(uiManager: UIManagerModule)
}