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

Commit 0d6856a1 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Allowing tracing to be enabled using command line on all build flavors"...

Merge "Allowing tracing to be enabled using command line on all build flavors" into ub-launcher3-qt-dev
parents 4ab6254b b88d4a64
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -27,16 +27,17 @@ import android.util.MutableLong;
import com.android.launcher3.config.FeatureFlags;

/**
 * A wrapper around {@link Trace} to allow easier proguarding for production builds.
 * A wrapper around {@link Trace} with some utility information.
 *
 * To enable any tracing log, execute the following command:
 * $ adb shell setprop log.tag.LAUNCHER_TRACE VERBOSE
 * $ adb shell setprop log.tag.TAGNAME VERBOSE
 */
public class TraceHelper {

    private static final boolean ENABLED = FeatureFlags.IS_DOGFOOD_BUILD;
    private static final boolean ENABLED = isLoggable("LAUNCHER_TRACE", VERBOSE);

    private static final boolean SYSTEM_TRACE = false;
    private static final boolean SYSTEM_TRACE = ENABLED;
    private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null;

    public static void beginSection(String sectionName) {