diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt index f6bf7ffe18e..bf01340c098 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt @@ -31,6 +31,7 @@ public object ViewUtil { * @param viewTag tag of the view this is event is dispatched to * @param surfaceId ID of the corresponding surface */ + @Suppress("DEPRECATION") @JvmStatic @UIManagerType public fun getUIManagerType(viewTag: Int, surfaceId: Int): Int { @@ -59,5 +60,10 @@ public object ViewUtil { * @param viewTag react tag * @return if the react tag received by parameter is a RootTag or not. */ - @JvmStatic public fun isRootTag(viewTag: Int): Boolean = viewTag % 10 == 1 + @Deprecated( + "You should not check the tag of the view to inspect if it's the rootTag. " + + "Relying on this logic could make your app/library break in the future.", + ReplaceWith("")) + @JvmStatic + public fun isRootTag(viewTag: Int): Boolean = viewTag % 10 == 1 }