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

Commit a64356b5 authored by Pascal Mütschard's avatar Pascal Mütschard
Browse files

Add a trace marker when a CUJ is started.

Bug: b/418970753
Flag: EXEMPT trace/logging change only
Test: local
Change-Id: I58c15d39145cba07990ce6f4da16c6d60bee792c
parent 4724576e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.HandlerThread;
import android.os.SystemClock;
import android.os.Trace;
import android.provider.DeviceConfig;
import android.text.TextUtils;
import android.util.Log;
@@ -378,6 +379,7 @@ public class InteractionJankMonitor {
     * @return boolean true if the tracker is begun successfully, false otherwise.
     */
    public boolean begin(@NonNull Configuration.Builder builder) {
        Trace.beginSection("InteractionJankMonitor#begin");
        try {
            final Configuration config = builder.build();
            postEventLogToWorkerThread((unixNanos, elapsedNanos, realtimeNanos) -> {
@@ -395,6 +397,8 @@ public class InteractionJankMonitor {
        } catch (IllegalArgumentException ex) {
            Log.d(TAG, "Build configuration failed!", ex);
            return false;
        } finally {
            Trace.endSection();
        }
    }