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

Commit 803e6a71 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge changes I38c76bb2,I81a55e92

am: 3aaca7dd

Change-Id: I97c472d0c9f351606651bca5920ba990b0cb48a4
parents 5969a3f7 3aaca7dd
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -508,7 +508,8 @@ bool LogBuffer::prune(log_id_t id, unsigned long pruneRows, uid_t caller_uid) {
    LogBufferElementCollection::iterator it;

    if (caller_uid != AID_ROOT) {
        // Only here if clearAll condition (pruneRows == ULONG_MAX)
        // Only here if clear all request from non system source, so chatty
        // filter logistics is not required.
        it = mLastSet[id] ? mLast[id] : mLogElements.begin();
        while (it != mLogElements.end()) {
            LogBufferElement *element = *it;
@@ -534,7 +535,9 @@ bool LogBuffer::prune(log_id_t id, unsigned long pruneRows, uid_t caller_uid) {
            }

            it = erase(it);
            pruneRows--;
            if (--pruneRows == 0) {
                break;
            }
        }
        LogTimeEntry::unlock();
        return busy;
@@ -678,7 +681,7 @@ bool LogBuffer::prune(log_id_t id, unsigned long pruneRows, uid_t caller_uid) {
                        && ((!gc && (element->getPid() == worstPid))
                           || (mLastWorstPidOfSystem[id].find(element->getPid())
                                == mLastWorstPidOfSystem[id].end()))) {
                    mLastWorstPidOfSystem[id][key] = it;
                    mLastWorstPidOfSystem[id][element->getPid()] = it;
                }
                if ((!gc && !worstPid && (key == worst))
                        || (mLastWorst[id].find(key) == mLastWorst[id].end())) {