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

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

Merge "Make PerfettoProtoLogImpl implement the Perfetto client interface" into main

parents 489fdc05 f38dbe48
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import com.android.internal.protolog.common.IProtoLogGroup;
import com.android.internal.protolog.common.LogDataType;
import com.android.internal.protolog.common.LogLevel;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -89,7 +88,7 @@ import java.util.concurrent.locks.ReentrantLock;
/**
 * A service for the ProtoLog logging system.
 */
public class PerfettoProtoLogImpl implements IProtoLog {
public class PerfettoProtoLogImpl extends IProtoLogClient.Stub implements IProtoLog {
    private static final String LOG_TAG = "ProtoLog";
    public static final String NULL_STRING = "null";
    private final AtomicInteger mTracingInstances = new AtomicInteger();
@@ -204,6 +203,15 @@ public class PerfettoProtoLogImpl implements IProtoLog {
        return mTracingInstances.get() > 0;
    }

    @Override
    public void toggleLogcat(boolean enabled, String[] groups) {
        if (enabled) {
            startLoggingToLogcat(groups, null);
        } else {
            stopLoggingToLogcat(groups, null);
        }
    }

    /**
     * Start text logging
     * @param groups Groups to start text logging for