summaryrefslogtreecommitdiff
path: root/cmds/incident_helper/src
diff options
context:
space:
mode:
authorYi Jin <jinyithu@google.com>2017-12-12 12:53:51 -0800
committerYi Jin <jinyithu@google.com>2017-12-12 13:20:46 -0800
commitf77a07df1cc71d1f25454de1b5c7da301541b837 (patch)
treec8d95c91cf7fe4c30b70eb494aec5c55cc72d54b /cmds/incident_helper/src
parentd04c00a47907452a76d31e7183e5cc37bdf4dbf3 (diff)
Create a new stream option which generates field name to id mapping
recursively for all its submessages. Also fix the wrong prefix for ro.build.version.XXX in proto. It is safe to adjust proto number for now since it is not used yet. Bug: 68774852 Test: atest incident_helper_test Change-Id: I46e43a407da6efc393eb3c39733aaf25a5cceb13
Diffstat (limited to 'cmds/incident_helper/src')
-rw-r--r--cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp b/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp
index a41ed6ebaa22..23393da01d48 100644
--- a/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp
+++ b/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp
@@ -53,10 +53,16 @@ SystemPropertiesParser::Parse(const int in, const int out) const
SystemPropertiesProto::_FIELD_COUNT);
Message sysProp(&sysPropTable);
- Table aaudioT(SystemPropertiesProto::Aaudio::_FIELD_NAMES,
+ Table aacDrcTable(SystemPropertiesProto::AacDrc::_FIELD_NAMES,
+ SystemPropertiesProto::AacDrc::_FIELD_IDS,
+ SystemPropertiesProto::AacDrc::_FIELD_COUNT);
+ Message aacDrc(&aacDrcTable);
+ sysProp.addSubMessage(SystemPropertiesProto::AAC_DRC, &aacDrc);
+
+ Table aaudioTable(SystemPropertiesProto::Aaudio::_FIELD_NAMES,
SystemPropertiesProto::Aaudio::_FIELD_IDS,
SystemPropertiesProto::Aaudio::_FIELD_COUNT);
- Message aaudio(&aaudioT);
+ Message aaudio(&aaudioTable);
sysProp.addSubMessage(SystemPropertiesProto::AAUDIO, &aaudio);
Table cameraTable(SystemPropertiesProto::Camera::_FIELD_NAMES,
@@ -142,8 +148,13 @@ SystemPropertiesParser::Parse(const int in, const int out) const
SystemPropertiesProto::Ro::Product::_FIELD_IDS,
SystemPropertiesProto::Ro::Product::_FIELD_COUNT);
Message product(&productTable);
- ro.addSubMessage(SystemPropertiesProto::Ro::PRODUCT, &product);
+ Table vendorTable(SystemPropertiesProto::Ro::Product::Vendor::_FIELD_NAMES,
+ SystemPropertiesProto::Ro::Product::Vendor::_FIELD_IDS,
+ SystemPropertiesProto::Ro::Product::Vendor::_FIELD_COUNT);
+ Message vendor(&vendorTable);
+ product.addSubMessage(SystemPropertiesProto::Ro::Product::VENDOR, &vendor);
+ ro.addSubMessage(SystemPropertiesProto::Ro::PRODUCT, &product);
sysProp.addSubMessage(SystemPropertiesProto::RO, &ro);
Table sysTable(SystemPropertiesProto::Sys::_FIELD_NAMES,