Query usage event for a longer time period and then trim the usage

events outside the expected period to make sure the app usage calculation near the boundaries are correct.

Test: make RunSettingsRoboTests + manual
Bug: 264858898
Change-Id: I9f6aa5a09a537f48a26a08b7dff8ae81e8a16e2a
This commit is contained in:
Kuan Wang
2023-01-13 12:37:05 +08:00
parent 8fce459806
commit 4a6b26558d
4 changed files with 139 additions and 115 deletions

View File

@@ -376,7 +376,7 @@ public class DataProcessManager {
// Generates the indexed AppUsagePeriod list data for each corresponding time slot for
// further use.
mAppUsagePeriodMap = DataProcessor.generateAppUsagePeriodMap(
mHourlyBatteryLevelsPerDay, mAppUsageEventList, mStartTimestampOfLevelData);
mHourlyBatteryLevelsPerDay, mAppUsageEventList);
}
private void tryToGenerateFinalDataAndApplyCallback() {