Transition BatteryInfo and BatteryUtils to BatteryUsageStats API

Bug: 173745486
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryHistoryPreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoLoaderTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.batterytip.detectors

Change-Id: I469ff8b88aa3307422c02f51943df4ef1759db56
This commit is contained in:
Dmitri Plotnikov
2021-02-19 14:34:01 -08:00
parent e604c56241
commit 820bee81d6
18 changed files with 296 additions and 180 deletions

View File

@@ -141,6 +141,11 @@ public class PowerUsageAdvanced extends PowerUsageBase {
return controllers;
}
@Override
protected boolean isBatteryHistoryNeeded() {
return true;
}
@Override
protected void refreshUi(@BatteryUpdateType int refreshType) {
final Context context = getContext();