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

Commit 13f08e69 authored by John Reck's avatar John Reck
Browse files

Add missing @NonNull

Change-Id: I343dd13a7f8518959c7b75162c5cebc5f933ae6f
Fixes: 122549813
Test: n/a
parent 8b9351ba
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.os;

import android.annotation.NonNull;

import com.android.internal.os.Zygote;

import dalvik.annotation.optimization.FastNative;
@@ -311,7 +313,7 @@ public final class Trace {
     * @param sectionName The name of the code section to appear in the trace.  This may be at
     * most 127 Unicode code units long.
     */
    public static void beginSection(String sectionName) {
    public static void beginSection(@NonNull String sectionName) {
        if (isTagEnabled(TRACE_TAG_APP)) {
            if (sectionName.length() > MAX_SECTION_NAME_LEN) {
                throw new IllegalArgumentException("sectionName is too long");
@@ -343,7 +345,7 @@ public final class Trace {
     * @param methodName The method name to appear in the trace.
     * @param cookie Unique identifier for distinguishing simultaneous events
     */
    public static void beginAsyncSection(String methodName, int cookie) {
    public static void beginAsyncSection(@NonNull String methodName, int cookie) {
        asyncTraceBegin(TRACE_TAG_APP, methodName, cookie);
    }

@@ -355,7 +357,7 @@ public final class Trace {
     * @param methodName The method name to appear in the trace.
     * @param cookie Unique identifier for distinguishing simultaneous events
     */
    public static void endAsyncSection(String methodName, int cookie) {
    public static void endAsyncSection(@NonNull String methodName, int cookie) {
        asyncTraceEnd(TRACE_TAG_APP, methodName, cookie);
    }

@@ -365,7 +367,7 @@ public final class Trace {
     * @param counterName The counter name to appear in the trace.
     * @param counterValue The counter value.
     */
    public static void setCounter(String counterName, long counterValue) {
    public static void setCounter(@NonNull String counterName, long counterValue) {
        if (isTagEnabled(TRACE_TAG_APP)) {
            nativeTraceCounter(TRACE_TAG_APP, counterName, counterValue);
        }