From 2a9a13d567bb63dabcd698a2ad737ef3b5513a1f Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 21 Jan 2025 18:58:15 -0800 Subject: [PATCH] Reduce visibility of methods in FabricUIManager (#48824) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48824 Reduce visibility of methods in FabricUIManager and fix lint warnings changelog: [Android][Breaking] Reduce visibility of FabricUIManager.setBinding() method, unused outside of react native Reviewed By: philIip Differential Revision: D68459708 fbshipit-source-id: 59081b9a87607b1d35c3fc88bb16e5980cfbd721 --- packages/react-native/ReactAndroid/api/ReactAndroid.api | 1 - .../main/java/com/facebook/react/fabric/FabricUIManager.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 82915571da4..3c701b5930c 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -2622,7 +2622,6 @@ public class com/facebook/react/fabric/FabricUIManager : com/facebook/react/brid public fun resolveView (I)Landroid/view/View; public fun sendAccessibilityEvent (II)V public fun sendAccessibilityEventFromJS (IILjava/lang/String;)V - public fun setBinding (Lcom/facebook/react/fabric/FabricUIManagerBinding;)V public fun setJSResponder (IIIZ)V public fun startSurface (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/WritableMap;II)I public fun startSurface (Lcom/facebook/react/interfaces/fabric/SurfaceHandler;Landroid/content/Context;Landroid/view/View;)V diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 6d4c7155803..7c448904b12 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -609,6 +609,7 @@ public class FabricUIManager * padding used by RN Android TextInput. * @return if theme data is available in the output parameters. */ + @SuppressWarnings("unused") public boolean getThemeData(int surfaceId, float[] defaultTextInputPadding) { SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(surfaceId); Context context = surfaceMountingManager != null ? surfaceMountingManager.getContext() : null; @@ -868,7 +869,7 @@ public class FabricUIManager mReactApplicationContext, componentName, surfaceId, reactTag, params); } - public void setBinding(FabricUIManagerBinding binding) { + void setBinding(FabricUIManagerBinding binding) { mBinding = binding; } @@ -985,7 +986,7 @@ public class FabricUIManager EventEmitterWrapper eventEmitter = mMountingManager.getEventEmitter(surfaceId, reactTag); if (eventEmitter == null) { if (mMountingManager.getViewExists(reactTag)) { - // The view is preallocated and created. However, it hasn't been mounted yet. We will have + // The view is pre-allocated and created. However, it hasn't been mounted yet. We will have // access to the event emitter later when the view is mounted. For now just save the event // in the view state and trigger it later. mMountingManager.enqueuePendingEvent(