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

Commit f5fbefdd authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Add traces around updateZenModeConfig

From field traces, it seems it often requires a lot of time (>190ms during LOCKSCREEN_TO_AOD CUJ) due to lock contention in the binder calls happening inside.

Adding a slice to make it more recognizable

Bug: 289485377
Test: Record Perfetto trace - check the new slice is visible
Change-Id: I77a662d17237246d8c9f2c06b38b5bfa64d5c69d
parent 1748418e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.database.ContentObserver;
import android.net.Uri;
import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings.Global;
@@ -122,7 +123,12 @@ public class ZenModeControllerImpl implements ZenModeController, Dumpable {
                userTracker.getUserId()) {
            @Override
            protected void handleValueChanged(int value, boolean observedChange) {
                try {
                    Trace.beginSection("updateZenModeConfig");
                    updateZenModeConfig();
                } finally {
                    Trace.endSection();
                }
            }
        };
        mNoMan = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);