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

Commit 7a28063d authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "MediaMetrics: Misc fixes" into rvc-dev am: cba42e3c

Change-Id: I2a0c7e82686fbf47d4e1e11223f1836fcbce1635
parents b1211fc1 cba42e3c
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@
#include <set>
#include <set>


#include <binder/Parcel.h>
#include <binder/Parcel.h>
#include <cutils/properties.h>
#include <utils/Errors.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/Log.h>
#include <utils/SortedVector.h>
#include <utils/SortedVector.h>
+1 −5
Original line number Original line Diff line number Diff line
@@ -27,12 +27,8 @@
#include <variant>
#include <variant>


#include <binder/Parcel.h>
#include <binder/Parcel.h>
#include <cutils/properties.h>
#include <utils/Errors.h>
#include <utils/Errors.h>
#include <utils/KeyedVector.h>
#include <utils/Timers.h> // nsecs_t
#include <utils/RefBase.h>
#include <utils/StrongPointer.h>
#include <utils/Timers.h>


namespace android {
namespace android {


+1 −1
Original line number Original line Diff line number Diff line
@@ -138,7 +138,7 @@ private:
            if (timeSequence.empty()           // no elements
            if (timeSequence.empty()           // no elements
                    || property.back() == AMEDIAMETRICS_PROP_SUFFIX_CHAR_DUPLICATES_ALLOWED
                    || property.back() == AMEDIAMETRICS_PROP_SUFFIX_CHAR_DUPLICATES_ALLOWED
                    || timeSequence.rbegin()->second != el) { // value changed
                    || timeSequence.rbegin()->second != el) { // value changed
                timeSequence.emplace(time, std::move(el));
                timeSequence.emplace_hint(timeSequence.end(), time, std::move(el));


                if (timeSequence.size() > kTimeSequenceMaxElements) {
                if (timeSequence.size() > kTimeSequenceMaxElements) {
                    ALOGV("%s: restricting maximum elements (discarding oldest) for %s",
                    ALOGV("%s: restricting maximum elements (discarding oldest) for %s",
+2 −2
Original line number Original line Diff line number Diff line
@@ -94,8 +94,8 @@ public:
        std::lock_guard lock(mLock);
        std::lock_guard lock(mLock);


        (void)gc(garbage);
        (void)gc(garbage);
        mLog.emplace(time, item);
        mLog.emplace_hint(mLog.end(), time, item);
        mItemMap[key].emplace(time, item);
        mItemMap[key].emplace_hint(mItemMap[key].end(), time, item);
        return NO_ERROR;  // no errors for now.
        return NO_ERROR;  // no errors for now.
    }
    }