Merge "StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize" into nyc-dev am: e749cd3

am: da3b2b7

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

Change-Id: Ica2d794be865b7eb05d8a3ad38ea9e2636410a3f
This commit is contained in:
Samuel Tan
2016-04-19 17:38:23 +00:00
committed by android-build-merger

View File

@@ -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();
}