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

Commit f7c9c1cb authored by Samuel Tan's avatar Samuel Tan Committed by android-build-merger
Browse files

Merge "StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize" into...

Merge "StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize" into nyc-dev am: e749cd3b am: da3b2b7f
am: d20aa366

* commit 'd20aa366':
  StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize

Change-Id: I1fbdded10a911917a80a4ec88a25111281d224b7
parents 2dfe9e01 d20aa366
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -593,7 +593,11 @@ public class StateMachine {
         * @param maxSize number of records to maintain at anyone time.
        */
        synchronized void setSize(int maxSize) {
            // TODO: once b/28217358 is fixed, add unit tests  to verify that these variables are
            // cleared after calling this method, and that subsequent calls to get() function as
            // expected.
            mMaxSize = maxSize;
            mOldestIndex = 0;
            mCount = 0;
            mLogRecVector.clear();
        }