diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.java deleted file mode 100644 index 4b68d18aef8..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.facebook.infer.annotation.Nullsafe; -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.fabric.mounting.MountingManager; - -@Nullsafe(Nullsafe.Mode.LOCAL) -final class DispatchStringCommandMountItem extends DispatchCommandMountItem { - - private final int mSurfaceId; - private final int mReactTag; - private final @NonNull String mCommandId; - private final @Nullable ReadableArray mCommandArgs; - - DispatchStringCommandMountItem( - int surfaceId, int reactTag, @NonNull String commandId, @Nullable ReadableArray commandArgs) { - mSurfaceId = surfaceId; - mReactTag = reactTag; - mCommandId = commandId; - mCommandArgs = commandArgs; - } - - @Override - public int getSurfaceId() { - return mSurfaceId; - } - - @Override - public void execute(@NonNull MountingManager mountingManager) { - mountingManager.receiveCommand(mSurfaceId, mReactTag, mCommandId, mCommandArgs); - } - - @Override - @NonNull - public String toString() { - return "DispatchStringCommandMountItem [" + mReactTag + "] " + mCommandId; - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt new file mode 100644 index 00000000000..fc3bbebdf9a --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt @@ -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" +}