Skip to content

Commit

Permalink
Stable API - Make classes in com.facebook.react.views.safeareaview
Browse files Browse the repository at this point in the history
…internal (facebook#47375)

Summary:

This makes the following class internal:
- ReactSafeAreaView
- ReactSafeAreaViewManager

Those classes should have not been exposed in the first place. Marked as breaking but no
meaningful usages are available in OSS:
https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+com.facebook.react.views.safeareaview.ReactSafeAreaView

Changelog:
[Android] [Breaking] - Stable API - Make classes in `com.facebook.react.views.safeareaview` internal

Reviewed By: javache

Differential Revision: D65422197
  • Loading branch information
cortinico authored and facebook-github-bot committed Nov 5, 2024
1 parent bbe714e commit af577ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 40 deletions.
35 changes: 0 additions & 35 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -6862,41 +6862,6 @@ public final class com/facebook/react/views/progressbar/ReactProgressBarViewMana
public final fun createProgressBar (Landroid/content/Context;I)Landroid/widget/ProgressBar;
}

public final class com/facebook/react/views/safeareaview/ReactSafeAreaView : android/view/ViewGroup {
public fun <init> (Lcom/facebook/react/uimanager/ThemedReactContext;)V
public final fun getReactContext ()Lcom/facebook/react/uimanager/ThemedReactContext;
}

public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/SafeAreaViewManagerInterface {
public static final field Companion Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion;
public static final field REACT_CLASS Ljava/lang/String;
public fun <init> ()V
public fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/LayoutShadowNode;
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
public fun getName ()Ljava/lang/String;
public fun getShadowNodeClass ()Ljava/lang/Class;
public synthetic fun updateState (Landroid/view/View;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
public fun updateState (Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
}

public class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
public fun <init> ()V
public fun getProperties (Ljava/util/Map;)V
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager;Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Ljava/lang/String;Ljava/lang/Object;)V
}

public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion {
}

public class com/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
public fun <init> ()V
public fun getProperties (Ljava/util/Map;)V
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
}

public abstract interface class com/facebook/react/views/scroll/FpsListener {
public abstract fun disable (Ljava/lang/String;)V
public abstract fun enable (Ljava/lang/String;)V
Expand Down
8 changes: 7 additions & 1 deletion packages/react-native/ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ android.useAndroidX=true
react.internal.disableJavaVersionAlignment=true

# Binary Compatibility Validator properties

# We ignore:
# - BuildConfig classes because they are generated and not part of the public API
# - PropsSetter classes because they are generated by the Annotation processor which is not used in OSS
binaryCompatibilityValidator.ignoredClasses=com.facebook.react.BuildConfig,\
com.facebook.react.views.unimplementedview.ReactUnimplementedViewManager$$PropsSetter
com.facebook.react.views.safeareaview.ReactSafeAreaViewManager$$PropsSetter,\
com.facebook.react.views.unimplementedview.ReactUnimplementedViewManager$$PropsSetter,\
com.facebook.react.views.safeareaview.ReactSafeAreaViewShadowNode$$PropsSetter

binaryCompatibilityValidator.ignoredPackages=com.facebook.debug,\
com.facebook.fbreact,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.facebook.react.uimanager.StateWrapper
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.UIManagerModule

public class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
internal class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
ViewGroup(reactContext) {
internal var stateWrapper: StateWrapper? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import com.facebook.react.viewmanagers.SafeAreaViewManagerInterface

/** View manager for [ReactSafeAreaView] components. */
@ReactModule(name = ReactSafeAreaViewManager.REACT_CLASS)
public class ReactSafeAreaViewManager() :
internal class ReactSafeAreaViewManager() :
ViewGroupManager<ReactSafeAreaView>(), SafeAreaViewManagerInterface<ReactSafeAreaView> {

private val delegate: ViewManagerDelegate<ReactSafeAreaView> = SafeAreaViewManagerDelegate(this)
Expand All @@ -45,7 +45,7 @@ public class ReactSafeAreaViewManager() :
return null
}

public companion object {
public const val REACT_CLASS: String = "RCTSafeAreaView"
internal companion object {
const val REACT_CLASS: String = "RCTSafeAreaView"
}
}

0 comments on commit af577ba

Please sign in to comment.