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

Commit f3d0c6f8 authored by Christine Tsai's avatar Christine Tsai Committed by Android (Google) Code Review
Browse files

Merge "Remove data dropping as an invalid bucket case"

parents a1c2f365 b7fcf00c
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -183,11 +183,9 @@ void ValueMetricProducer::onSlicedConditionMayChangeLocked(bool overallCondition

void ValueMetricProducer::dropDataLocked(const int64_t dropTimeNs) {
    StatsdStats::getInstance().noteBucketDropped(mMetricId);
    // We are going to flush the data without doing a pull first so we need to invalidte the data.
    bool pullNeeded = mIsPulled && mCondition == ConditionState::kTrue;
    if (pullNeeded) {
        invalidateCurrentBucket();
    }

    // The current partial bucket is not flushed and does not require a pull,
    // so the data is still valid.
    flushIfNeededLocked(dropTimeNs);
    clearPastBucketsLocked(dropTimeNs);
}