Skip to content

Commit a15e8f3

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Mark interop classes and interfaces as Unstable
Summary: Mark interop classes and interfaces as Unstable bypass-github-export-checks changelog: [internal] internal Reviewed By: fkgozali, arushikesarwani94 Differential Revision: D54128912 fbshipit-source-id: 56956fc38bac01f461bf686fda0f05a7a105008e
1 parent 0274ad0 commit a15e8f3

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,14 +2626,6 @@ public class com/facebook/react/fabric/events/FabricEventEmitter : com/facebook/
26262626
public fun receiveTouches (Ljava/lang/String;Lcom/facebook/react/bridge/WritableArray;Lcom/facebook/react/bridge/WritableArray;)V
26272627
}
26282628

2629-
public abstract interface class com/facebook/react/fabric/interop/UIBlock {
2630-
public abstract fun execute (Lcom/facebook/react/fabric/interop/UIBlockViewResolver;)V
2631-
}
2632-
2633-
public abstract interface class com/facebook/react/fabric/interop/UIBlockViewResolver {
2634-
public abstract fun resolveView (I)Landroid/view/View;
2635-
}
2636-
26372629
public abstract interface class com/facebook/react/fabric/mounting/LayoutMetricsConversions {
26382630
public static fun getMaxSize (I)F
26392631
public static fun getMinSize (I)F

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/interop/UIBlock.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
package com.facebook.react.fabric.interop
1111

12+
import com.facebook.react.common.annotations.UnstableReactNativeAPI
13+
1214
/**
1315
* Interop Interface added to support `addUiBlock` and `prependUIBlock` methods in Fabric.
1416
* Historically those methods were only available in `UIManagerModule` (Paper, the old renderer).
@@ -17,6 +19,7 @@ package com.facebook.react.fabric.interop
1719
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
1820
* or View Commands to achieve a same results.
1921
*/
22+
@UnstableReactNativeAPI
2023
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
2124
public fun interface UIBlock {
2225
/**

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/interop/UIBlockViewResolver.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package com.facebook.react.fabric.interop
99

1010
import android.view.View
11+
import com.facebook.react.common.annotations.UnstableReactNativeAPI
1112

1213
/**
1314
* This interface is used as receiver parameter for [UIBlock].
@@ -17,6 +18,7 @@ import android.view.View
1718
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
1819
* or View Commands to achieve a same results.
1920
*/
21+
@UnstableReactNativeAPI
2022
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
2123
public interface UIBlockViewResolver {
2224
/**

packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/interop/FakeRCTEventEmitter.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ package com.facebook.react.bridge.interop
1111

1212
import com.facebook.react.bridge.WritableArray
1313
import com.facebook.react.bridge.WritableMap
14+
import com.facebook.react.common.annotations.UnstableReactNativeAPI
1415
import com.facebook.react.uimanager.events.RCTEventEmitter
1516

17+
@UnstableReactNativeAPI
1618
class FakeRCTEventEmitter : RCTEventEmitter {
1719

1820
override fun receiveEvent(targetReactTag: Int, eventName: String, event: WritableMap?) = Unit

packages/react-native/ReactAndroid/src/test/java/com/facebook/react/bridge/interop/InteropModuleRegistryTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import org.junit.Assert.assertTrue
1919
import org.junit.Before
2020
import org.junit.Test
2121

22+
@OptIn(UnstableReactNativeAPI::class)
2223
class InteropModuleRegistryTest {
2324

2425
lateinit var underTest: InteropModuleRegistry

packages/react-native/ReactAndroid/src/test/java/com/facebook/react/fabric/internal/interop/InteropUiBlockListenerTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77

88
package com.facebook.react.fabric.internal.interop
99

10+
import com.facebook.react.common.annotations.UnstableReactNativeAPI
1011
import com.facebook.testutils.fakes.FakeUIManager
1112
import org.junit.Assert.assertEquals
1213
import org.junit.Test
1314

15+
@OptIn(UnstableReactNativeAPI::class)
1416
class InteropUiBlockListenerTest {
1517

1618
@Test

packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/fakes/FakeUIManager.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ import com.facebook.react.bridge.ReadableMap
1515
import com.facebook.react.bridge.UIManager
1616
import com.facebook.react.bridge.UIManagerListener
1717
import com.facebook.react.bridge.WritableMap
18+
import com.facebook.react.common.annotations.UnstableReactNativeAPI
1819
import com.facebook.react.fabric.interop.UIBlockViewResolver
1920

21+
@OptIn(UnstableReactNativeAPI::class)
2022
class FakeUIManager : UIManager, UIBlockViewResolver {
2123

2224
// The number of times resolveView was called

0 commit comments

Comments
 (0)