logd: reduce chance of dropped 1 messages

- do not time out at 1 second if drop has count of less than 4

Bug: 20334069
Bug: 20370119
Change-Id: I787cb553dfab5ed71abd6ed72b63de675f834e0c
This commit is contained in:
Mark Salyzyn 2015-04-23 07:47:54 -07:00
parent dc999df939
commit 35173a9ac5
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ public:
uint64_t current = e->getRealTime().nsec() - NS_PER_SEC;
ssize_t index = -1;
while((index = next(index)) >= 0) {
if (current > editEntryAt(index).getLast()->getRealTime().nsec()) {
LogBufferElement *l = editEntryAt(index).getLast();
if ((l->getDropped() >= 4) && (current > l->getRealTime().nsec())) {
removeAt(index);
index = -1;
}