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

Commit 958e4b4e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove android.tracing.perfetto_protolog_tracing flag uses" into main

parents 1a798ad0 f07c2941
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ public class ProtoLog {

    @RavenwoodReplace(reason = "Always use the Log backend on ravenwood, not Perfetto")
    private static boolean logOnlyToLogcat() {
        return !android.tracing.Flags.perfettoProtologTracing();
        return false;
    }

    private static boolean logOnlyToLogcat$ravenwood() {
+20 −24
Original line number Diff line number Diff line
@@ -110,7 +110,6 @@ public class ProtoLogImpl {
                    + "viewerConfigPath = " + sViewerConfigPath);

            final var groups = sLogGroups.values().toArray(new IProtoLogGroup[0]);
            if (android.tracing.Flags.perfettoProtologTracing()) {
            var viewerConfigFile = new File(sViewerConfigPath);
            if (!viewerConfigFile.exists()) {
                // TODO(b/353530422): Remove - temporary fix to unblock b/352290057
@@ -133,9 +132,6 @@ public class ProtoLogImpl {
                    throw new RuntimeException(e);
                }
            }
            } else {
                sServiceInstance = createLegacyProtoLogImpl(groups);
            }

            sCacheUpdater.update(sServiceInstance);
        }
+0 −4
Original line number Diff line number Diff line
@@ -128,10 +128,6 @@ public class BugreportManagerTest {
            mUiTracesPreDumped.add(Paths.get("/data/misc/wmtrace/ime_trace_service.winscope"));
        }

        if (!android.tracing.Flags.perfettoProtologTracing()) {
            mUiTracesPreDumped.add(Paths.get("/data/misc/wmtrace/wm_log.winscope"));
        }

        mHandler = createHandler();
        mExecutor = (runnable) -> {
            if (mHandler != null) {
+6 −18
Original line number Diff line number Diff line
@@ -51,29 +51,17 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio
        final ILogger logger = pw::println;
        switch (args[0]) {
            case "status": {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                return false;
            }
                ((LegacyProtoLogImpl) mShellProtoLog).getStatus();
                return true;
            }
            case "start": {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                return false;
            }
                ((LegacyProtoLogImpl) mShellProtoLog).startProtoLog(pw);
                return true;
            }
            case "stop": {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                return false;
            }
                ((LegacyProtoLogImpl) mShellProtoLog).stopProtoLog(pw, true);
                return true;
            }
            case "enable-text": {
                String[] groups = Arrays.copyOfRange(args, 1, args.length);
                int result = mShellProtoLog.startLoggingToLogcat(groups, logger);
+2 −6
Original line number Diff line number Diff line
@@ -6900,13 +6900,9 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    private void dumpLogStatus(PrintWriter pw) {
        pw.println("WINDOW MANAGER LOGGING (dumpsys window logging)");
        if (android.tracing.Flags.perfettoProtologTracing()) {
        pw.println("Deprecated legacy command. Use Perfetto commands instead.");
        return;
    }
        ((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).getStatus();
    }

    private void dumpSessionsLocked(PrintWriter pw) {
        pw.println("WINDOW MANAGER SESSIONS (dumpsys window sessions)");
Loading