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

Commit 274f9768 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Revert^2 "Use registerGroups API"

812d479d

Change-Id: I4f11b24853d05dda9fa59cda73fb9ee6c32c4a16
parent 9732c70a
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