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

Commit 32efa2fd authored by Ray Essick's avatar Ray Essick Committed by Android (Google) Code Review
Browse files

Merge "Nuplayer logging empty records to media.metrics" into oc-dev

parents 565a0ed7 2e82d316
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1535,8 +1535,6 @@ void NuPlayer::onPause() {
    if (driver != NULL) {
        int64_t now = systemTime();
        int64_t played = now - mLastStartedPlayingTimeNs;
        ALOGD("played from %" PRId64 " to %" PRId64 " = %" PRId64 ,
              mLastStartedPlayingTimeNs, now, played);

        driver->notifyMorePlayingTimeUs((played+500)/1000);
    }
+6 −2
Original line number Diff line number Diff line
@@ -583,8 +583,12 @@ void NuPlayerDriver::logMetrics(const char *where) {
        return;
    }

    // only bother to log non-empty records
    if (mAnalyticsItem->count() > 0) {
    // 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) {

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