Merge "Make PerfettoProtoLogImpl implement the Perfetto client interface" into main
diff --git a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
index 4d71723..f937700 100644
--- a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
+++ b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
@@ -66,7 +66,6 @@
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 @@
/**
* 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 @@
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