Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2899,7 +2899,7 @@ public abstract interface class com/facebook/react/jstasks/HeadlessJsTaskRetryPo
public abstract fun update ()Lcom/facebook/react/jstasks/HeadlessJsTaskRetryPolicy;
}

public class com/facebook/react/jstasks/LinearCountingRetryPolicy : com/facebook/react/jstasks/HeadlessJsTaskRetryPolicy {
public final class com/facebook/react/jstasks/LinearCountingRetryPolicy : com/facebook/react/jstasks/HeadlessJsTaskRetryPolicy {
public fun <init> (II)V
public fun canRetry ()Z
public fun copy ()Lcom/facebook/react/jstasks/HeadlessJsTaskRetryPolicy;
Expand Down Expand Up @@ -4253,14 +4253,21 @@ public final class com/facebook/react/uimanager/PointerEvents : java/lang/Enum {
public static final field AUTO Lcom/facebook/react/uimanager/PointerEvents;
public static final field BOX_NONE Lcom/facebook/react/uimanager/PointerEvents;
public static final field BOX_ONLY Lcom/facebook/react/uimanager/PointerEvents;
public static final field Companion Lcom/facebook/react/uimanager/PointerEvents$Companion;
public static final field NONE Lcom/facebook/react/uimanager/PointerEvents;
public static fun canBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public static fun canChildrenBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public static fun parsePointerEvents (Ljava/lang/String;)Lcom/facebook/react/uimanager/PointerEvents;
public static final fun canBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public static final fun canChildrenBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public static final fun parsePointerEvents (Ljava/lang/String;)Lcom/facebook/react/uimanager/PointerEvents;
public static fun valueOf (Ljava/lang/String;)Lcom/facebook/react/uimanager/PointerEvents;
public static fun values ()[Lcom/facebook/react/uimanager/PointerEvents;
}

public final class com/facebook/react/uimanager/PointerEvents$Companion {
public final fun canBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public final fun canChildrenBeTouchTarget (Lcom/facebook/react/uimanager/PointerEvents;)Z
public final fun parsePointerEvents (Ljava/lang/String;)Lcom/facebook/react/uimanager/PointerEvents;
}

public class com/facebook/react/uimanager/ReactAccessibilityDelegate : androidx/customview/widget/ExploreByTouchHelper {
public static final field TOP_ACCESSIBILITY_ACTION_EVENT Ljava/lang/String;
public static final field sActionIdMap Ljava/util/HashMap;
Expand Down Expand Up @@ -5522,10 +5529,10 @@ public class com/facebook/react/uimanager/events/FabricEventDispatcher : com/fac
public fun unregisterEventEmitter (I)V
}

public class com/facebook/react/uimanager/events/NativeGestureUtil {
public fun <init> ()V
public static fun notifyNativeGestureEnded (Landroid/view/View;Landroid/view/MotionEvent;)V
public static fun notifyNativeGestureStarted (Landroid/view/View;Landroid/view/MotionEvent;)V
public final class com/facebook/react/uimanager/events/NativeGestureUtil {
public static final field INSTANCE Lcom/facebook/react/uimanager/events/NativeGestureUtil;
public static final fun notifyNativeGestureEnded (Landroid/view/View;Landroid/view/MotionEvent;)V
public static final fun notifyNativeGestureStarted (Landroid/view/View;Landroid/view/MotionEvent;)V
}

public class com/facebook/react/uimanager/events/PointerEvent : com/facebook/react/uimanager/events/Event {
Expand Down Expand Up @@ -7782,11 +7789,10 @@ public class com/facebook/react/views/view/ReactViewManager$$PropsSetter : com/f
public fun setProperty (Lcom/facebook/react/views/view/ReactViewManager;Lcom/facebook/react/views/view/ReactViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
}

public class com/facebook/react/views/view/ViewGroupClickEvent : com/facebook/react/uimanager/events/Event {
public final class com/facebook/react/views/view/ViewGroupClickEvent : com/facebook/react/uimanager/events/Event {
public fun <init> (I)V
public fun <init> (II)V
public fun canCoalesce ()Z
protected fun getEventData ()Lcom/facebook/react/bridge/WritableMap;
public fun getEventName ()Ljava/lang/String;
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.hermes.reactexecutor;
package com.facebook.hermes.reactexecutor

/** Holds runtime configuration for a Hermes VM instance (master or snapshot). */
public final class RuntimeConfig {
public long heapSizeMB;
public class RuntimeConfig {
public var heapSizeMB: Long = 0L
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.animated

import com.facebook.react.bridge.JSApplicationCausedNativeException
import com.facebook.react.bridge.ReadableMap

internal class ModulusAnimatedNode(
config: ReadableMap,
private val nativeAnimatedNodesManager: NativeAnimatedNodesManager
) : ValueAnimatedNode() {

private val inputNode: Int = config.getInt("input")
private val modulus: Double = config.getDouble("modulus")

override public fun update() {
val animatedNode = nativeAnimatedNodesManager.getNodeById(inputNode)
if (animatedNode is ValueAnimatedNode) {
val animatedNodeValue = animatedNode.value
mValue = (animatedNodeValue % modulus + modulus) % modulus
} else {
throw JSApplicationCausedNativeException(
"Illegal node ID set as an input for Animated.modulus node")
}
}

override public fun prettyPrint(): String {
return "NativeAnimatedNodesManager[$mTag] inputNode: $inputNode modulus: $modulus super: ${super.prettyPrint()}"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge

/**
* Listener for receiving activity lifecycle events.
*
* When multiple activities share a react instance, only the most recent one's lifecycle events get
* forwarded to listeners. Consider the following scenarios:
* 1. Navigating from Activity A to B will trigger two events: A.onHostPause and B.onHostResume. Any
* subsequent lifecycle events coming from Activity A, such as onHostDestroy, will be ignored.
* 2. Navigating back from Activity B to Activity A will trigger the same events: B.onHostPause and
* A.onHostResume. Any subsequent events coming from Activity B, such as onHostDestroy, are
* ignored.
* 3. Navigating back from Activity A to a non-React Activity or to the home screen will trigger two
* events: onHostPause and onHostDestroy.
* 4. Navigating from Activity A to a non-React Activity B will trigger one event: onHostPause.
* Later, if Activity A is destroyed (e.g. because of resource contention), onHostDestroy is
* triggered.
*/
public interface LifecycleEventListener {

/**
* Called either when the host activity receives a resume event (e.g. [Activity.onResume] or if
* the native module that implements this is initialized while the host activity is already
* resumed. Always called for the most current activity.
*/
public fun onHostResume()

/**
* Called when host activity receives pause event (e.g. [Activity.onPause]. Always called for the
* most current activity.
*/
public fun onHostPause()

/**
* Called when host activity receives destroy event (e.g. [Activity.onDestroy]. Only called for
* the last React activity to be destroyed.
*/
public fun onHostDestroy()
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge;
package com.facebook.react.bridge

public interface NativeArrayInterface {
@Override
String toString();
override fun toString(): String
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.bridge;
package com.facebook.react.bridge

import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.proguard.annotations.DoNotStrip

/** Defines the type of an object stored in a {@link ReadableArray} or {@link ReadableMap}. */
/** Defines the type of an object stored in a [ReadableArray] or [ReadableMap]. */
@DoNotStrip
public enum ReadableType {
public enum class ReadableType {
Null,
Boolean,
Number,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.fabric.mounting.mountitems

import com.facebook.react.bridge.ReadableArray
import com.facebook.react.fabric.mounting.MountingManager

internal class DispatchIntCommandMountItem(
private val surfaceId: Int,
private val reactTag: Int,
private val commandId: Int,
private val commandArgs: ReadableArray?
) : DispatchCommandMountItem() {

override public fun getSurfaceId(): Int = surfaceId

override public fun execute(mountingManager: MountingManager) {
@Suppress("DEPRECATION")
mountingManager.receiveCommand(surfaceId, reactTag, commandId, commandArgs)
}

override public fun toString(): String = "DispatchIntCommandMountItem [$reactTag] $commandId"
}
Loading