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
17 changes: 8 additions & 9 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2159,9 +2159,9 @@ public abstract interface class com/facebook/react/devsupport/DevSupportManagerF
public abstract fun create (Landroid/content/Context;Lcom/facebook/react/devsupport/ReactInstanceDevHelper;Ljava/lang/String;ZLcom/facebook/react/devsupport/interfaces/RedBoxHandler;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;ILjava/util/Map;Lcom/facebook/react/common/SurfaceDelegateFactory;Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;)Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
}

public class com/facebook/react/devsupport/DoubleTapReloadRecognizer {
public final class com/facebook/react/devsupport/DoubleTapReloadRecognizer {
public fun <init> ()V
public fun didDoubleTapR (ILandroid/view/View;)Z
public final fun didDoubleTapR (ILandroid/view/View;)Z
}

public abstract interface class com/facebook/react/devsupport/HMRClient : com/facebook/react/bridge/JavaScriptModule {
Expand Down Expand Up @@ -2887,7 +2887,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 @@ -5515,10 +5515,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 @@ -7775,11 +7775,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;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.devsupport

import android.os.Handler
import android.os.Looper
import android.view.KeyEvent
import android.view.View
import android.widget.EditText

/**
* A class allows recognizing double key tap of "R", used to reload JS in [AbstractReactActivity],
* [RedBoxDialogSurfaceDelegate] and [ReactActivity].
*/
public class DoubleTapReloadRecognizer {
private var doRefresh = false

public fun didDoubleTapR(keyCode: Int, view: View): Boolean {
if (keyCode == KeyEvent.KEYCODE_R && view !is EditText) {
if (doRefresh) {
doRefresh = false
return true
} else {
doRefresh = true
Handler(Looper.getMainLooper()).postDelayed({ doRefresh = false }, DOUBLE_TAP_DELAY)
}
}
return false
}

private companion object {
private const val DOUBLE_TAP_DELAY: Long = 200
}
}

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"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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 DispatchStringCommandMountItem(
private val surfaceId: Int,
private val reactTag: Int,
private val commandId: String,
private val commandArgs: ReadableArray?
) : DispatchCommandMountItem() {

override public fun getSurfaceId(): Int = surfaceId

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

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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.jstasks

public class LinearCountingRetryPolicy(
private val retryAttempts: Int,
private val delayBetweenAttemptsInMs: Int
) : HeadlessJsTaskRetryPolicy {

override public fun canRetry(): Boolean = retryAttempts > 0

override public fun getDelay(): Int = delayBetweenAttemptsInMs

override public fun update(): HeadlessJsTaskRetryPolicy {
val remainingRetryAttempts = retryAttempts - 1

return if (remainingRetryAttempts > 0) {
LinearCountingRetryPolicy(remainingRetryAttempts, delayBetweenAttemptsInMs)
} else {
NoRetryPolicy.INSTANCE
}
}

override public fun copy(): HeadlessJsTaskRetryPolicy =
LinearCountingRetryPolicy(retryAttempts, delayBetweenAttemptsInMs)
}
Loading