Mike Ma d2672bda9c Dump connmetrics in protobuf format
Add protobuf dumpsys of connmetrics. Primarily used by incident service
to capture an incident report proto.

Currently, "proto" is used to dump the ring buffer in base64-encoded
proto. The newly added "--proto" arg is a dumpsys convention to dump
a service in proto wire format. This change reuses most of the code
for executing "proto". Other cmds remain unchanged.

Command to invoke (any of the following after lunch and env setup):
$ adb shell dumpsys connmetrics --proto
$ incident_report 3049

Bug: 146086778
Test: $ incident_report 3049, then compare the content with "dumpsys
      connmetrics"

Change-Id: Ief2297d99aeb553224a83894ba3b9695ff0b87aa
2020-01-15 17:13:37 -08:00

40 lines
885 B
Plaintext

java_library_static {
name: "framework-protos",
host_supported: true,
proto: {
type: "nano",
},
srcs: ["src/**/*.proto"],
sdk_version: "9",
// Pin java_version until jarjar is certified to support later versions. http://b/72703434
java_version: "1.8",
target: {
android: {
jarjar_rules: "jarjar-rules.txt",
},
host: {
static_libs: ["libprotobuf-java-nano"],
},
},
}
java_library_static {
name: "metrics-constants-protos",
host_supported: true,
proto: {
type: "nano",
},
srcs: ["src/metrics_constants/metrics_constants.proto"],
sdk_version: "system_current",
}
filegroup {
name: "system-messages-proto-src",
srcs: ["src/system_messages.proto"],
}
filegroup {
name: "ipconnectivity-proto-src",
srcs: ["src/ipconnectivity.proto"],
}