Purge low percentage BatteryDiffEntry from indexed usage map

Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I943e224147ccbfa80578511d6cb0d6adf6f8da0f
This commit is contained in:
ykhung
2021-04-17 00:47:48 +08:00
committed by YUKAI HUNG
parent 976c6ac56d
commit 3cdf60c016
3 changed files with 48 additions and 3 deletions

View File

@@ -152,7 +152,8 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
mBatteryIndexedMap =
ConvertUtils.getIndexedUsageMap(
mPrefContext, /*timeSlotSize=*/ CHART_LEVEL_ARRAY_SIZE - 1,
mBatteryHistoryKeys, batteryHistoryMap);
mBatteryHistoryKeys, batteryHistoryMap,
/*purgeLowPercentageData=*/ true);
forceRefreshUi();
Log.d(TAG, String.format(