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

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

Merge changes Ib6421dfd,Ib0d2f733,Ib0ae629e into main

* changes:
  Add missing doc strings
  Use single PerfettoProtoLogImpl for all tests
  Trace test viewer config in PerfettoProtoLogImplTest
parents 00411046 72f5a375
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -283,10 +283,24 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
    public static class Instance extends DataSourceInstance {

        public interface TracingInstanceStartCallback {
            /**
             * Execute the tracing instance's onStart callback.
             * @param instanceIdx The index of the tracing instance we are executing the callback
             *                    for.
             * @param config The protolog configuration for the tracing instance we are executing
             *               the callback for.
             */
            void run(int instanceIdx, @NonNull ProtoLogConfig config);
        }

        public interface TracingInstanceStopCallback {
            /**
             * Execute the tracing instance's onStop callback.
             * @param instanceIdx The index of the tracing instance we are executing the callback
             *                    for.
             * @param config The protolog configuration for the tracing instance we are executing
             *               the callback for.
             */
            void run(int instanceIdx, @NonNull ProtoLogConfig config);
        }

+7 −0
Original line number Diff line number Diff line
@@ -43,6 +43,13 @@ public class ProtoLogViewerConfigReader {
        return mLogMessageMap.get(messageHash);
    }

    /**
     * Load the viewer configs for the target groups into memory.
     * Only viewer configs loaded into memory can be required. So this must be called for all groups
     * we want to query before we query their viewer config.
     *
     * @param groups Groups to load the viewer configs from file into memory.
     */
    public synchronized void loadViewerConfig(@NonNull String[] groups) {
        loadViewerConfig(groups, (message) -> {});
    }
+5 −0
Original line number Diff line number Diff line
@@ -40,6 +40,11 @@ import java.io.IOException;
public class Utils {
    private static final String LOG_TAG = "ProtoLogUtils";

    /**
     * Dump the viewer config provided by the input stream to the target datasource.
     * @param dataSource The datasource to dump the ProtoLog viewer config to.
     * @param viewerConfigInputStreamProvider The InputStream that provided the proto viewer config.
     */
    public static void dumpViewerConfig(@NonNull ProtoLogDataSource dataSource,
            @NonNull ViewerConfigInputStreamProvider viewerConfigInputStreamProvider) {
        dataSource.trace(ctx -> {
+124 −116

File changed.

Preview size limit exceeded, changes collapsed.