Statsd uidmap includes vers string and installer
Each config can choose to include version strings and installer with
each metrics report. This data may be useful in the cloud to filter
the app-specific data.
BUG: 115626330
Change-Id: I3972ff2a94e7f0347ac0cc8a443cf328c1731e13
Test: Modified unit-tests, verified on marlin-eng
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
index f4c70be..1cd60fe 100644
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ b/cmds/statsd/src/StatsLogProcessor.cpp
@@ -354,11 +354,9 @@
// This skips the uid map if it's an empty config.
if (it->second->getNumMetrics() > 0) {
uint64_t uidMapToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_ID_UID_MAP);
- if (it->second->hashStringInReport()) {
- mUidMap->appendUidMap(dumpTimeStampNs, key, &str_set, proto);
- } else {
- mUidMap->appendUidMap(dumpTimeStampNs, key, nullptr, proto);
- }
+ mUidMap->appendUidMap(
+ dumpTimeStampNs, key, it->second->hashStringInReport() ? &str_set : nullptr,
+ it->second->versionStringsInReport(), it->second->installerInReport(), proto);
proto->end(uidMapToken);
}