diff --git a/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/BUCK b/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/BUCK new file mode 100644 index 000000000..82f2df704 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/BUCK @@ -0,0 +1,12 @@ +include_defs("//ReactAndroid/DEFS") + +android_library( + name = "debugoverlay", + srcs = glob(["*.java"]), + visibility = [ + "PUBLIC", + ], + deps = [ + react_native_dep("third-party/java/jsr-305:jsr-305"), + ], +) diff --git a/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/DebugOverlayTag.java b/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/DebugOverlayTag.java new file mode 100644 index 000000000..7b54322fa --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/DebugOverlayTag.java @@ -0,0 +1,25 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +package com.facebook.debug.debugoverlay; + +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/ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK b/ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK new file mode 100644 index 000000000..e60249992 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK @@ -0,0 +1,13 @@ +include_defs("//ReactAndroid/DEFS") + +android_library( + name = "tags", + srcs = glob(["*.java"]), + visibility = [ + "PUBLIC", + ], + deps = [ + react_native_dep("java/com/facebook/debug/debugoverlay:debugoverlay"), + react_native_dep("third-party/java/jsr-305:jsr-305"), + ], +) diff --git a/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java b/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java new file mode 100644 index 000000000..abdf17a46 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.java @@ -0,0 +1,13 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +package com.facebook.debug.tags; + +import android.graphics.Color; +import com.facebook.debug.debugoverlay.DebugOverlayTag; + +/** Category for debug overlays. */ +public class ReactDebugOverlayTags { + + public static final DebugOverlayTag PERFORMANCE = + new DebugOverlayTag("Performance", "Markers for Performance", Color.GREEN); +}