diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 63779a89345..4118a337203 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -439,23 +439,6 @@ public abstract interface class com/facebook/react/ViewManagerOnDemandReactPacka public abstract fun getViewManagerNames (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/Collection; } -public abstract class com/facebook/react/animated/AnimatedNode { - public static final field Companion Lcom/facebook/react/animated/AnimatedNode$Companion; - public static final field DEFAULT_ANIMATED_NODE_CHILD_COUNT I - public static final field INITIAL_BFS_COLOR I - public fun ()V - public final fun addChild (Lcom/facebook/react/animated/AnimatedNode;)V - public fun onAttachedToNode (Lcom/facebook/react/animated/AnimatedNode;)V - public fun onDetachedFromNode (Lcom/facebook/react/animated/AnimatedNode;)V - public abstract fun prettyPrint ()Ljava/lang/String; - public final fun prettyPrintWithChildren ()Ljava/lang/String; - public final fun removeChild (Lcom/facebook/react/animated/AnimatedNode;)V - public fun update ()V -} - -public final class com/facebook/react/animated/AnimatedNode$Companion { -} - public final class com/facebook/react/animated/NativeAnimatedModule : com/facebook/fbreact/specs/NativeAnimatedModuleSpec, com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/bridge/UIManagerListener { public static final field ANIMATED_MODULE_DEBUG Z public static final field Companion Lcom/facebook/react/animated/NativeAnimatedModule$Companion; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.kt index 8f698cbe4b1..3759555142e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.kt @@ -10,11 +10,11 @@ package com.facebook.react.animated import java.util.ArrayList /** Base class for all Animated.js library node types that can be created on the "native" side. */ -public abstract class AnimatedNode { +internal abstract class AnimatedNode { - public companion object { - public const val INITIAL_BFS_COLOR: Int = 0 - public const val DEFAULT_ANIMATED_NODE_CHILD_COUNT: Int = 1 + companion object { + const val INITIAL_BFS_COLOR: Int = 0 + const val DEFAULT_ANIMATED_NODE_CHILD_COUNT: Int = 1 } // TODO: T196787278 Reduce the visibility of these fields to package once we have @@ -27,7 +27,7 @@ public abstract class AnimatedNode { @JvmField internal var BFSColor: Int = INITIAL_BFS_COLOR @JvmField internal var tag: Int = -1 - public fun addChild(child: AnimatedNode): Unit { + fun addChild(child: AnimatedNode): Unit { val currentChildren = children ?: ArrayList(DEFAULT_ANIMATED_NODE_CHILD_COUNT).also { children = it } @@ -36,7 +36,7 @@ public abstract class AnimatedNode { child.onAttachedToNode(this) } - public fun removeChild(child: AnimatedNode): Unit { + fun removeChild(child: AnimatedNode): Unit { val currentChildren = children ?: return child.onDetachedFromNode(this) currentChildren.remove(child) @@ -48,24 +48,24 @@ public abstract class AnimatedNode { * is important to also override [onDetachedFromNode] to clear that reference once current node * gets detached. */ - public open fun onAttachedToNode(parent: AnimatedNode): Unit = Unit + open fun onAttachedToNode(parent: AnimatedNode): Unit = Unit /** See [onAttachedToNode] */ - public open fun onDetachedFromNode(parent: AnimatedNode): Unit = Unit + open fun onDetachedFromNode(parent: AnimatedNode): Unit = Unit /** * This method will be run on each node at most once every repetition of the animation loop. It * will be executed on a node only when all the node's parent has already been updated. Therefore * it can be used to calculate node's value. */ - public open fun update(): Unit = Unit + open fun update(): Unit = Unit /** * Pretty-printer for the AnimatedNode. Only called in production pre-crash for debug diagnostics. */ - public abstract fun prettyPrint(): String + abstract fun prettyPrint(): String - public fun prettyPrintWithChildren(): String { + fun prettyPrintWithChildren(): String { val currentChildren = children?.joinToString(" ") return prettyPrint() +