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

Commit 3991809b authored by Ray Essick's avatar Ray Essick
Browse files

Suppress empty media.metrics records from nuplayer

tweaks the mechanism (a count) we use to suppress nuplayer records
for media.metrics to reflect recent changes that included datasource
information.

This stops spurious records that pollute / degrade the uploaded
metrics data.

Bug: 38270725
Test: examine output from: dumpsys media.metrics
parent 24fd2f7d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -588,10 +588,10 @@ void NuPlayerDriver::logMetrics(const char *where) {

    // log only non-empty records
    // we always updateMetrics() before we get here
    // and that always injects 2 fields (duration and playing time) into
    // the record.
    // So the canonical "empty" record has 2 elements in it.
    if (mAnalyticsItem->count() > 2) {
    // and that always injects 3 fields (duration, playing time, and
    // datasource) into the record.
    // So the canonical "empty" record has 3 elements in it.
    if (mAnalyticsItem->count() > 3) {

        mAnalyticsItem->setFinalized(true);
        mAnalyticsItem->selfrecord();