diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.java deleted file mode 100644 index 4ee3353ffa8b..000000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.java +++ /dev/null @@ -1,30 +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.debug.debugoverlay.model; - -import javax.annotation.concurrent.Immutable; - -/** Tag for a debug overlay log message. Name must be unique. */ -@Immutable -public class DebugOverlayTag { - - /** Name of tag. */ - public final String name; - - /** Description to display in settings. */ - public final String description; - - /** Color for tag display. */ - public final int color; - - public DebugOverlayTag(String name, String description, int color) { - this.name = name; - this.description = description; - this.color = color; - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.kt new file mode 100644 index 000000000000..8e8e06f4508f --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.kt @@ -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.debug.debugoverlay.model + +import javax.annotation.concurrent.Immutable + +/** Tag for a debug overlay log message. Name must be unique. */ +@Immutable +public class DebugOverlayTag public constructor( + /** Name of tag. */ + public val name: String, + /** Description to display in settings. */ + public val description: String, + /** Color for tag display. */ + public val color: Int +) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java deleted file mode 100644 index 9df0352aa422..000000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java +++ /dev/null @@ -1,38 +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.debug.tags; - -import android.graphics.Color; -import com.facebook.debug.debugoverlay.model.DebugOverlayTag; - -/** Category for debug overlays. */ -public class ReactDebugOverlayTags { - - public static final DebugOverlayTag PERFORMANCE = - new DebugOverlayTag("Performance", "Markers for Performance", Color.GREEN); - public static final DebugOverlayTag NAVIGATION = - new DebugOverlayTag("Navigation", "Tag for navigation", Color.rgb(0x9C, 0x27, 0xB0)); - public static final DebugOverlayTag RN_CORE = - new DebugOverlayTag("RN Core", "Tag for React Native Core", Color.BLACK); - public static final DebugOverlayTag BRIDGE_CALLS = - new DebugOverlayTag( - "Bridge Calls", "JS to Java calls (warning: this is spammy)", Color.MAGENTA); - public static final DebugOverlayTag NATIVE_MODULE = - new DebugOverlayTag("Native Module", "Native Module init", Color.rgb(0x80, 0x00, 0x80)); - public static final DebugOverlayTag UI_MANAGER = - new DebugOverlayTag( - "UI Manager", - "UI Manager View Operations (requires restart\nwarning: this is spammy)", - Color.CYAN); - public static final DebugOverlayTag FABRIC_UI_MANAGER = - new DebugOverlayTag("FabricUIManager", "Fabric UI Manager View Operations", Color.CYAN); - public static final DebugOverlayTag FABRIC_RECONCILER = - new DebugOverlayTag("FabricReconciler", "Reconciler for Fabric", Color.CYAN); - public static final DebugOverlayTag RELAY = - new DebugOverlayTag("Relay", "including prefetching", Color.rgb(0xFF, 0x99, 0x00)); -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.kt new file mode 100644 index 000000000000..2fe134714f61 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.kt @@ -0,0 +1,45 @@ +/* + * 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.debug.tags + +import android.graphics.Color +import com.facebook.debug.debugoverlay.model.DebugOverlayTag + +/** Category for debug overlays. */ +public object ReactDebugOverlayTags { + @JvmField + public val PERFORMANCE: DebugOverlayTag = + DebugOverlayTag("Performance", "Markers for Performance", Color.GREEN) + @JvmField + public val NAVIGATION: DebugOverlayTag = + DebugOverlayTag("Navigation", "Tag for navigation", Color.rgb(0x9C, 0x27, 0xB0)) + @JvmField + public val RN_CORE: DebugOverlayTag = + DebugOverlayTag("RN Core", "Tag for React Native Core", Color.BLACK) + @JvmField + public val BRIDGE_CALLS: DebugOverlayTag = DebugOverlayTag( + "Bridge Calls", "JS to Java calls (warning: this is spammy)", Color.MAGENTA + ) + @JvmField + public val NATIVE_MODULE: DebugOverlayTag = + DebugOverlayTag("Native Module", "Native Module init", Color.rgb(0x80, 0x00, 0x80)) + @JvmField + public val UI_MANAGER: DebugOverlayTag = DebugOverlayTag( + "UI Manager", + "UI Manager View Operations (requires restart\nwarning: this is spammy)", + Color.CYAN + ) + @JvmField + public val FABRIC_UI_MANAGER: DebugOverlayTag = + DebugOverlayTag("FabricUIManager", "Fabric UI Manager View Operations", Color.CYAN) + @JvmField + public val FABRIC_RECONCILER: DebugOverlayTag = + DebugOverlayTag("FabricReconciler", "Reconciler for Fabric", Color.CYAN) + @JvmField + public val RELAY: DebugOverlayTag = + DebugOverlayTag("Relay", "including prefetching", Color.rgb(0xFF, 0x99, 0x00)) +}