Only compile required messages with perfetto_trace_javastream_protos
Used to save space in the framework.jar which isn't r8 optimized to
remove unused constants.
Bug: 321668269
Test: abtd running v2/android-crystalball-eng/health/microbench/bootup/idle/aosp/system-processes-memory and checking pinner_system_/system/framework/framework.jar_bytes metric value
Change-Id: Iabfc7383d99952fad4fb91080788c69c09e093a8
diff --git a/Android.bp b/Android.bp
index 10ad21e..6066f90 100644
--- a/Android.bp
+++ b/Android.bp
@@ -15462,13 +15462,14 @@
"soong_zip",
],
cmd: "mkdir -p $(genDir)/$(in) " +
- "&& $(location aprotoc) " +
+ "&& $(location aprotoc) " +
"--plugin=$(location protoc-gen-javastream) " +
+ "--javastream_opt=include_filter:perfetto.protos.TracePacket,perfetto.protos.ShellTransition,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogMessage,perfetto.protos.ProtoLogViewerConfig,perfetto.protos.ShellHandlerMapping,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogGroup,perfetto.protos.ProtoLogConfig,perfetto.protos.DataSourceConfig,perfetto.protos.InternedString,perfetto.protos.InternedData,perfetto.protos.ProtoLogLevel,perfetto.protos.TestEvent,perfetto.protos.TestEvent.TestPayload,perfetto.protos.TestConfig,perfetto.protos.TestConfig.DummyFields " +
"--javastream_out=$(genDir)/$(in) " +
"-Iexternal/protobuf/src " +
"-Iexternal/perfetto " +
"-I . $(in) " +
- "&& $(location soong_zip) " +
+ "&& $(location soong_zip) " +
"-jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
data: [
":libprotobuf-internal-protos",