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

Commit 6c6a7a88 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Mediaserver memory increase after record"

parents 088c3181 97af2039
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -125,6 +125,7 @@ StagefrightRecorder::StagefrightRecorder(const String16 &opPackageName)


    ALOGV("Constructor");
    ALOGV("Constructor");


    mMetricsItem = NULL;
    mAnalyticsDirty = false;
    mAnalyticsDirty = false;
    reset();
    reset();
}
}
@@ -199,11 +200,13 @@ void StagefrightRecorder::updateMetrics() {
void StagefrightRecorder::flushAndResetMetrics(bool reinitialize) {
void StagefrightRecorder::flushAndResetMetrics(bool reinitialize) {
    ALOGV("flushAndResetMetrics");
    ALOGV("flushAndResetMetrics");
    // flush anything we have, maybe setup a new record
    // flush anything we have, maybe setup a new record
    if (mAnalyticsDirty && mMetricsItem != NULL) {
    if (mMetricsItem != NULL) {
        if (mAnalyticsDirty) {
            updateMetrics();
            updateMetrics();
            if (mMetricsItem->count() > 0) {
            if (mMetricsItem->count() > 0) {
                mMetricsItem->selfrecord();
                mMetricsItem->selfrecord();
            }
            }
        }
        delete mMetricsItem;
        delete mMetricsItem;
        mMetricsItem = NULL;
        mMetricsItem = NULL;
    }
    }