Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 948ce5eb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a hidden API to set trace tag on atrace counters." into main

parents 084f8d43 6a2489cf
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -520,8 +520,20 @@ public final class Trace {
     * @param counterValue The counter value.
     */
    public static void setCounter(@NonNull String counterName, long counterValue) {
        if (isTagEnabled(TRACE_TAG_APP)) {
            nativeTraceCounter(TRACE_TAG_APP, counterName, counterValue);
        setCounter(TRACE_TAG_APP, counterName, counterValue);
    }

    /**
     * Writes trace message to indicate the value of a given counter under a given trace tag.
     *
     * @param traceTag The trace tag.
     * @param counterName The counter name to appear in the trace.
     * @param counterValue The counter value.
     * @hide
     */
    public static void setCounter(long traceTag, @NonNull String counterName, long counterValue) {
        if (isTagEnabled(traceTag)) {
            nativeTraceCounter(traceTag, counterName, counterValue);
        }
    }