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

Commit 990edc2f authored by Ray Essick's avatar Ray Essick Committed by android-build-merger
Browse files

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

am: 32efa2fd

Change-Id: I3546502201086644c02080b029dfcf223761753a
parents 509850e7 32efa2fd
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1536,8 +1536,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();