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

Skip to content
Commit 8af46572 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Drop TAG_FIRST_OCCURRENCE_FLAG when populating history tag array

When there are more than MAX_HISTORY_BUFFER of history events,
we store the history buffer and create a new one.  At that point,
we set the TAG_FIRST_OCCURRENCE_FLAG flag on all pre-existing indexes
in the history tag pool to indicate that those tags have not yet
occurred in the current history buffer and therefore would still
need to be written into the buffer if they occur in the future.
As a result, we end up with some indexes in the history tag pool
having the TAG_FIRST_OCCURRENCE_FLAG set.  We need to reset this flag
when adding tags to mHistoryTags in order to restore the natural
sequence of indexes.

Bug: 206823946
Test: atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: I3affd09ea45accf3ac8706bd8114d0d7ca385a69
parent b6d0af35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment