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
6 changes: 3 additions & 3 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ public class com/facebook/react/fabric/BindingImpl : com/facebook/react/fabric/B
public fun unregisterSurface (Lcom/facebook/react/fabric/SurfaceHandlerBinding;)V
}

public class com/facebook/react/fabric/ComponentFactory {
public final class com/facebook/react/fabric/ComponentFactory {
public fun <init> ()V
}

Expand Down Expand Up @@ -2777,8 +2777,8 @@ public abstract interface class com/facebook/react/fabric/mounting/mountitems/Ba

public abstract class com/facebook/react/fabric/mounting/mountitems/DispatchCommandMountItem : com/facebook/react/fabric/mounting/mountitems/MountItem {
public fun <init> ()V
public fun getRetries ()I
public fun incrementRetries ()V
public final fun getRetries ()I
public final fun incrementRetries ()V
}

public abstract interface class com/facebook/react/fabric/mounting/mountitems/MountItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.common;

import com.facebook.infer.annotation.Nullsafe;
package com.facebook.react.common

/**
* Lifecycle state for an Activity. The state right after pause and right before resume are the
Expand All @@ -23,8 +21,7 @@
* <p>RESUMED is used when a ReactRootView is rendered on the screen and the user can interact with
* it.
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public enum LifecycleState {
public enum class LifecycleState {
BEFORE_CREATE,
BEFORE_RESUME,
RESUMED,
Expand Down

This file was deleted.

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

import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStripAny

@DoNotStripAny
public class ComponentFactory {

@Suppress("NoHungarianNotation") private val mHybridData: HybridData = initHybrid()

private companion object {
init {
FabricSoLoader.staticInit()
}

@JvmStatic private external fun initHybrid(): HybridData
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,22 @@
* LICENSE file in the root directory of this source tree.
*/

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

import androidx.annotation.UiThread;
import com.facebook.infer.annotation.Nullsafe;
import androidx.annotation.UiThread

/**
* This is a common interface for View Command operations. Once we delete the deprecated {@link
* DispatchIntCommandMountItem}, we can delete this interface too. It provides a set of common
* operations to simplify generic operations on all types of ViewCommands.
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class DispatchCommandMountItem implements MountItem {
private int mNumRetries = 0;
public abstract class DispatchCommandMountItem : MountItem {
private var numRetries: Int = 0

@UiThread
public void incrementRetries() {
mNumRetries++;
public fun incrementRetries() {
numRetries++
}

@UiThread
public int getRetries() {
return mNumRetries;
}
@UiThread public fun getRetries(): Int = numRetries
}

This file was deleted.

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

import com.facebook.common.logging.FLog

public abstract class NotificationOnlyHandler : RequestHandler {

override final fun onRequest(params: Any?, responder: Responder) {
responder.error("Request is not supported")
FLog.e(JSPackagerClient::class.java.simpleName, "Request is not supported")
}

override abstract fun onNotification(params: Any?)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.uimanager;

import com.facebook.infer.annotation.Nullsafe;
package com.facebook.react.uimanager

// Common conditionals:
// - `kind == PARENT` checks whether the node can host children in the native tree.
// - `kind != NONE` checks whether the node appears in the native tree.

@Nullsafe(Nullsafe.Mode.LOCAL)
public enum NativeKind {
public enum class NativeKind {
// Node is in the native hierarchy and the HierarchyOptimizer should assume it can host children
// (e.g. because it's a ViewGroup). Note that it's okay if the node doesn't support children. When
// the HierarchyOptimizer generates children manipulation commands for that node, the
Expand All @@ -24,5 +21,5 @@ public enum NativeKind {
// because it isn't a ViewGroup). Consequently, its children need to be hosted by an ancestor.
LEAF,
// Node is not in the native hierarchy.
NONE
NONE,
}

This file was deleted.

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

import com.facebook.react.common.ClearableSynchronizedPool
import com.facebook.yoga.YogaNode

/** Static holder for a recycling pool of YogaNodes. */
internal object YogaNodePool {

private val pool: ClearableSynchronizedPool<YogaNode> by
lazy(LazyThreadSafetyMode.SYNCHRONIZED) { ClearableSynchronizedPool(1024) }

@JvmStatic fun get(): ClearableSynchronizedPool<YogaNode> = pool
}