diff options
-rw-r--r-- | services/tests/powerstatstests/src/com/android/server/power/stats/BatteryStatsHistoryTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryStatsHistoryTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryStatsHistoryTest.java index 8fad93184732..5165e34c7fcd 100644 --- a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryStatsHistoryTest.java +++ b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryStatsHistoryTest.java @@ -456,6 +456,8 @@ public class BatteryStatsHistoryTest { } private void fillActiveFile(BatteryStatsHistory history) { + awaitCompletion(); // Wait for BatteryHistoryDirectory.trim if necessary. + // Create roughly 1K of history int initialSize = history.getHistoryUsedSize(); while (history.getHistoryUsedSize() < initialSize + 1000) { |