+27
−40
+8
−3
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This code was duplicated throughout LogBuffer.cpp, so refactor it into a single location and clean up some comments along the way. This may fix a subtle bug: if `logcat -c` is used from a non-privileged UID, the current code may set mLast to the oldest seen log message *from that UID* and not not the oldest log message for that log id. That may prevent pruning from the start of that log, resulting in old log entries that are impossible to delete. Bug: 144382260 Test: logging works, and above scenario is not seen Change-Id: I1749293ce6ea1697dd8a9258cfd7eab29dbeac6e