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

Commit 4f5f0050 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Use registerGroups API

Flag: NONE part of refactor
Test: none
Change-Id: I49f0c519dd26b6560f514c95dbea1c19021154b2
parent ca8dc9e4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -105,13 +105,14 @@ public class ProtoLogImpl {
    public static synchronized IProtoLog getSingleInstance() {
        if (sServiceInstance == null) {
            if (android.tracing.Flags.perfettoProtologTracing()) {
                sServiceInstance = new PerfettoProtoLogImpl(
                        sViewerConfigPath, sLogGroups, sCacheUpdater);
                sServiceInstance = new PerfettoProtoLogImpl(sViewerConfigPath, sCacheUpdater);
            } else {
                sServiceInstance = new LegacyProtoLogImpl(
                        sLegacyOutputFilePath, sLegacyViewerConfigPath, sLogGroups, sCacheUpdater);
                        sLegacyOutputFilePath, sLegacyViewerConfigPath, sCacheUpdater);
            }

            IProtoLogGroup[] groups = sLogGroups.values().toArray(new IProtoLogGroup[0]);
            sServiceInstance.registerGroups(groups);
            sCacheUpdater.run();
        }
        return sServiceInstance;
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.annotation.VisibleForTesting;

import com.android.internal.protolog.ProtoLog;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.protolog.ShellProtoLogGroup;

import java.util.ArrayList;

@@ -75,6 +76,7 @@ public class ShellInit {
     */
    @VisibleForTesting
    public void init() {
        ProtoLog.registerGroups(ShellProtoLogGroup.values());
        ProtoLog.v(WM_SHELL_INIT, "Initializing Shell Components: %d", mInitCallbacks.size());
        SurfaceControl.setDebugUsageAfterRelease(true);
        // Init in order of registration