/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/ |
D | BatteryLevelDataTest.java | 56 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_allDataInOneHour_returnExpectedList() 75 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_OneHourDataPerDay_returnExpectedList() 95 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_OneDayData_returnExpectedList() 117 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_MultipleDaysData_returnExpectedList() 139 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_FirstDayOneHourData_returnExpectedList() 160 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_LastDayNoData_returnExpectedList() 182 assertThat(BatteryLevelData.getDailyTimestamps(timestamps)).isEqualTo(expectedTimestamps); in getDailyTimestamps_LastDayOneHourData_returnExpectedList() 187 final BatteryLevelData batteryLevelData = in combine_normalFlow_returnExpectedResult() 188 new BatteryLevelData(Map.of(1691596800000L, 90, 1691604000000L, 80)); in combine_normalFlow_returnExpectedResult() 202 BatteryLevelData result = in combine_normalFlow_returnExpectedResult() [all …]
|
D | DataProcessManagerTest.java | 166 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay = in start_loadExpectedAppUsageData() 174 new BatteryLevelData.PeriodBatteryLevelData( in start_loadExpectedAppUsageData() 183 new BatteryLevelData.PeriodBatteryLevelData( in start_loadExpectedAppUsageData() 379 final BatteryLevelData resultData = in getBatteryLevelData_allDataInOneHour_returnExpectedResult() 408 final BatteryLevelData resultData = in getBatteryLevelData_returnExpectedResult() 487 final BatteryLevelData resultData, in verifyExpectedBatteryLevelData() 492 final BatteryLevelData.PeriodBatteryLevelData dailyResultData = in verifyExpectedBatteryLevelData() 494 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyResultData = in verifyExpectedBatteryLevelData() 503 final BatteryLevelData.PeriodBatteryLevelData dailyResultData, in verifyExpectedDailyBatteryLevelData() 511 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyResultData, in verifyExpectedHourlyBatteryLevelData()
|
D | BatteryChartPreferenceControllerTest.java | 94 BatteryLevelData.sTestCalendar = Calendar.getInstance(); in setUp() 95 BatteryLevelData.sTestCalendar.setTimeZone(timeZone); in setUp() 125 BatteryLevelData.sTestCalendar = null; in tearDown() 478 BatteryLevelData batteryLevelData = in selectedSlotText_selectFirstSlotAfterTimeUpdated_withMinuteText() 549 BatteryLevelData batteryLevelData = in getTotalHours_getExpectedResult() 563 private static BatteryLevelData createBatteryLevelData(int numOfHours, int levelOffset) { in createBatteryLevelData() 577 BatteryLevelData.sTestCalendar.setTimeInMillis(current); in createBatteryLevelData() 579 return new BatteryLevelData(batteryLevelMap); in createBatteryLevelData()
|
D | DataProcessorTest.java | 204 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay = in generateAppUsagePeriodMap_returnExpectedResult() 212 new BatteryLevelData.PeriodBatteryLevelData( in generateAppUsagePeriodMap_returnExpectedResult() 221 new BatteryLevelData.PeriodBatteryLevelData( in generateAppUsagePeriodMap_returnExpectedResult() 367 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay = in generateAppUsagePeriodMap_emptyEventList_returnNull() 370 new BatteryLevelData.PeriodBatteryLevelData( in generateAppUsagePeriodMap_emptyEventList_returnNull() 478 final BatteryLevelData resultData = in getLevelDataThroughProcessedHistoryMap_OneDayData_returnExpectedResult() 509 final BatteryLevelData resultData = in getLevelDataThroughProcessedHistoryMap_MultipleDaysData_returnExpectedResult() 569 final BatteryLevelData resultData = in getLevelDataThroughProcessedHistoryMap_daylightSaving25Hour_returnExpectedResult() 670 final BatteryLevelData resultData = in getLevelDataThroughProcessedHistoryMap_daylightSaving23Hour_returnExpectedResult() 860 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay = in getBatteryDiffDataMap_emptyHistoryMap_returnEmpty() [all …]
|
D | ConvertUtilsTest.java | 566 final BatteryLevelData batteryLevelData = in convertToBatteryEventList_normalCase_returnsExpectedResult() 567 new BatteryLevelData( in convertToBatteryEventList_normalCase_returnsExpectedResult() 586 final BatteryLevelData batteryLevelData = in convertToBatteryEventList_multipleDays_returnsExpectedResult() 587 new BatteryLevelData( in convertToBatteryEventList_multipleDays_returnsExpectedResult()
|
D | PowerUsageAdvancedTest.java | 76 new BatteryLevelData( in setUp()
|
D | BatteryTipsCardPreferenceTest.java | 91 new BatteryLevelData( in setUp()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/ |
D | PowerUsageAdvanced.java | 90 @VisibleForTesting Optional<BatteryLevelData> mBatteryLevelData; 198 private void onBatteryLevelDataUpdate(BatteryLevelData batteryLevelData) { in onBatteryLevelDataUpdate() 495 implements LoaderManager.LoaderCallbacks<BatteryLevelData> { 497 public Loader<BatteryLevelData> onCreateLoader(int id, Bundle bundle) { in onCreateLoader() 498 return new AsyncLoaderCompat<BatteryLevelData>(getContext().getApplicationContext()) { in onCreateLoader() 500 protected void onDiscardResult(BatteryLevelData result) {} in onCreateLoader() 503 public BatteryLevelData loadInBackground() { in onCreateLoader() 516 Loader<BatteryLevelData> loader, BatteryLevelData batteryLevelData) { in onLoadFinished() 521 public void onLoaderReset(Loader<BatteryLevelData> loader) {} in onLoaderReset()
|
D | BatteryLevelData.java | 39 public final class BatteryLevelData { class 114 public BatteryLevelData(@NonNull Map<Long, Integer> batteryLevelMap) { in BatteryLevelData() method in BatteryLevelData 169 static BatteryLevelData combine( in combine() 170 @Nullable BatteryLevelData existingBatteryLevelData, in combine() 188 return batteryLevelMap.size() < MIN_SIZE ? null : new BatteryLevelData(batteryLevelMap); in combine()
|
D | DataProcessManager.java | 91 private final List<BatteryLevelData.PeriodBatteryLevelData> mHourlyBatteryLevelsPerDay; 132 @NonNull final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay, in DataProcessManager() 582 public static BatteryLevelData getBatteryLevelData( in getBatteryLevelData() 601 final BatteryLevelData batteryLevelData = in getBatteryLevelData() 619 : BatteryLevelData.combine(batteryLevelData, batteryLevelRecordEvents); in getBatteryLevelData() 622 private static BatteryLevelData getPeriodBatteryLevelData( in getPeriodBatteryLevelData() 679 final BatteryLevelData batteryLevelData = in getPeriodBatteryLevelData()
|
D | BatteryChartPreferenceController.java | 193 void onBatteryLevelDataUpdate(final BatteryLevelData batteryLevelData) { in onBatteryLevelDataUpdate() 215 for (BatteryLevelData.PeriodBatteryLevelData hourlyBatteryLevelsPerDay : in onBatteryLevelDataUpdate() 543 static int getTotalHours(final BatteryLevelData batteryLevelData) { 697 @NonNull final BatteryLevelData batteryLevelData) { 698 BatteryLevelData.PeriodBatteryLevelData firstDayLevelData =
|
D | DataProcessor.java | 145 final BatteryLevelData batteryLevelData = in getBatteryUsageData() 270 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay, in generateAppUsagePeriodMap() 439 static BatteryLevelData getLevelDataThroughProcessedHistoryMap( in getLevelDataThroughProcessedHistoryMap() 452 return new BatteryLevelData(batteryLevelMap); in getLevelDataThroughProcessedHistoryMap() 521 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay, in getBatteryDiffDataMap() 595 final @Nullable BatteryLevelData batteryLevelData) { in generateBatteryUsageMap() 605 List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay = in generateBatteryUsageMap() 1267 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay, in insertHourlyUsageDiffData() 1290 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay, in insertDailyUsageDiffData() 1827 final List<BatteryLevelData.PeriodBatteryLevelData> hourlyBatteryLevelsPerDay) { in isUsageMapValid()
|
D | AnomalyEventWrapper.java | 207 boolean hasHighlightSlotPair(BatteryLevelData batteryLevelData) { in hasHighlightSlotPair() 214 Pair<Integer, Integer> getHighlightSlotPair(BatteryLevelData batteryLevelData) { in getHighlightSlotPair()
|
D | ConvertUtils.java | 334 final BatteryLevelData batteryLevelData) { in convertToBatteryEventList() 336 final List<BatteryLevelData.PeriodBatteryLevelData> levelDataList = in convertToBatteryEventList() 340 final BatteryLevelData.PeriodBatteryLevelData oneDayData = in convertToBatteryEventList()
|
D | BatteryUsageDataLoader.java | 121 final BatteryLevelData batteryLevelData = in preprocessBatteryUsageSlots()
|