Add function getBatteryHistorySinceLastFullCharge, used to replace

getBatteryHistory in BatteryHistoryLoader.

getBatteryHistory couldn't be changed directly as it needs to be kept
for other features.

Bug: 236101687
Test: make RunSettingsRoboTests
Change-Id: I3e3cdd3a0225228bf76f6750f6a56f031666720f
Merged-In: I3e3cdd3a0225228bf76f6750f6a56f031666720f
This commit is contained in:
Kuan Wang
2022-07-08 14:43:04 +08:00
parent 4a48dc5e96
commit e39ecafa1f
2 changed files with 11 additions and 0 deletions

View File

@@ -149,6 +149,11 @@ public interface PowerUsageFeatureProvider {
*/
Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context);
/**
* Returns battery history data since last full charge with corresponding timestamp key.
*/
Map<Long, Map<String, BatteryHistEntry>> getBatteryHistorySinceLastFullCharge(Context context);
/**
* Returns {@link Uri} to monitor battery history data is update.
*/

View File

@@ -165,6 +165,12 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
return null;
}
@Override
public Map<Long, Map<String, BatteryHistEntry>> getBatteryHistorySinceLastFullCharge(
Context context) {
return null;
}
@Override
public Uri getBatteryHistoryUri() {
return null;