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

Commit b88d4a64 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Allowing tracing to be enabled using command line on all

build flavors

Change-Id: I5f8ee996bdcede2393eeb4aaa1b45fec7619d405
parent 8d19146b
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) {