From 59a43e6d5dcdec3f9190f97d78966240cca430d3 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 27 Mar 2024 05:50:47 -0700 Subject: [PATCH] Unbreak oss build due to explicit API mode (#43660) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43660 Changelog: [Internal] Reviewed By: cortinico, fabriziocucci Differential Revision: D55375856 fbshipit-source-id: d1df4965549069979410d8b07bb2518264238c8c --- .../ReactAndroid/api/ReactAndroid.api | 22 ------------------- .../react/bridge/BridgeReactContext.kt | 2 +- .../uimanager/ComponentNameResolverBinding.kt | 4 ++-- .../uimanager/UIConstantsProviderBinding.kt | 8 +++---- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 82ff782176deac..23055d29bc7025 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -3988,11 +3988,6 @@ public abstract interface class com/facebook/react/uimanager/ComponentNameResolv public abstract fun getComponentNames ()[Ljava/lang/String; } -public final class com/facebook/react/uimanager/ComponentNameResolverBinding { - public static final field INSTANCE Lcom/facebook/react/uimanager/ComponentNameResolverBinding; - public static final fun install (Lcom/facebook/react/bridge/RuntimeExecutor;Ljava/lang/Object;)V -} - public class com/facebook/react/uimanager/DisplayMetricsHolder { public fun ()V public static fun getDisplayMetricsWritableMap (D)Lcom/facebook/react/bridge/WritableMap; @@ -4855,23 +4850,6 @@ public abstract interface class com/facebook/react/uimanager/UIBlock { public abstract fun execute (Lcom/facebook/react/uimanager/NativeViewHierarchyManager;)V } -public final class com/facebook/react/uimanager/UIConstantsProviderBinding { - public static final field INSTANCE Lcom/facebook/react/uimanager/UIConstantsProviderBinding; - public static final fun install (Lcom/facebook/react/bridge/RuntimeExecutor;Lcom/facebook/react/uimanager/UIConstantsProviderBinding$DefaultEventTypesProvider;Lcom/facebook/react/uimanager/UIConstantsProviderBinding$ConstantsForViewManagerProvider;Lcom/facebook/react/uimanager/UIConstantsProviderBinding$ConstantsProvider;)V -} - -public abstract interface class com/facebook/react/uimanager/UIConstantsProviderBinding$ConstantsForViewManagerProvider { - public abstract fun getConstantsForViewManager (Ljava/lang/String;)Lcom/facebook/react/bridge/NativeMap; -} - -public abstract interface class com/facebook/react/uimanager/UIConstantsProviderBinding$ConstantsProvider { - public abstract fun getConstants ()Lcom/facebook/react/bridge/NativeMap; -} - -public abstract interface class com/facebook/react/uimanager/UIConstantsProviderBinding$DefaultEventTypesProvider { - public abstract fun getDefaultEventTypes ()Lcom/facebook/react/bridge/NativeMap; -} - public class com/facebook/react/uimanager/UIImplementation { protected final field mEventDispatcher Lcom/facebook/react/uimanager/events/EventDispatcher; protected field mLayoutUpdateListener Lcom/facebook/react/uimanager/UIImplementation$LayoutUpdateListener; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.kt index 7ca3ef1cd9d338..0f37c2fd675f8a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.kt @@ -17,4 +17,4 @@ import com.facebook.react.common.annotations.DeprecatedInNewArchitecture * BridgeReactContext. */ @DeprecatedInNewArchitecture -class BridgeReactContext(base: Context) : ReactApplicationContext(base) {} +public class BridgeReactContext(base: Context) : ReactApplicationContext(base) {} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt index 4c646e3d78d2ea..894dbf0e343ccf 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt @@ -13,11 +13,11 @@ import com.facebook.soloader.SoLoader import kotlin.jvm.JvmStatic @DoNotStripAny -public object ComponentNameResolverBinding { +internal object ComponentNameResolverBinding { init { SoLoader.loadLibrary("uimanagerjni") } @JvmStatic - public external fun install(runtimeExecutor: RuntimeExecutor, componentNameResolver: Object) + public external fun install(runtimeExecutor: RuntimeExecutor, componentNameResolver: Any) } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt index cfd3b8bf670d64..bc7a369ff0c1a7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt @@ -14,7 +14,7 @@ import com.facebook.soloader.SoLoader import kotlin.jvm.JvmStatic @DoNotStripAny -public object UIConstantsProviderBinding { +internal object UIConstantsProviderBinding { init { SoLoader.loadLibrary("uimanagerjni") } @@ -30,18 +30,18 @@ public object UIConstantsProviderBinding { @DoNotStripAny public interface DefaultEventTypesProvider { /* Returns UIManager's constants. */ - fun getDefaultEventTypes(): NativeMap + public fun getDefaultEventTypes(): NativeMap } @DoNotStripAny public interface ConstantsForViewManagerProvider { /* Returns UIManager's constants. */ - fun getConstantsForViewManager(viewManagerName: String): NativeMap? + public fun getConstantsForViewManager(viewManagerName: String): NativeMap? } @DoNotStripAny public interface ConstantsProvider { /* Returns UIManager's constants. */ - fun getConstants(): NativeMap + public fun getConstants(): NativeMap } }