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

Commit 98d43ebf authored by Zhen Zhang's avatar Zhen Zhang
Browse files

Add trace section for unbindOtherUserServices

Add a TimingsTraceAndSlog section around unbindOtherUserServices method

Test: atest ManagedServicesTest

Change-Id: I86c48fb19c20c41e28a4e8bd0f7d00e92deabd66
parent d7c538d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.XmlUtils;
import com.android.internal.util.function.TriPredicate;
import com.android.server.notification.NotificationManagerService.DumpFilter;
import com.android.server.utils.TimingsTraceAndSlog;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -1225,6 +1226,8 @@ abstract public class ManagedServices {
     */
    @VisibleForTesting
    void unbindOtherUserServices(int currentUser) {
        TimingsTraceAndSlog t = new TimingsTraceAndSlog();
        t.traceBegin("ManagedServices.unbindOtherUserServices_current" + currentUser);
        final SparseArray<Set<ComponentName>> componentsToUnbind = new SparseArray<>();

        synchronized (mMutex) {
@@ -1239,6 +1242,7 @@ abstract public class ManagedServices {
            }
        }
        unbindFromServices(componentsToUnbind);
        t.traceEnd();
    }

    protected void unbindFromServices(SparseArray<Set<ComponentName>> componentsToUnbind) {