Populate new fields foreground_service_usage_time_in_ms,

foreground_usage_consume_power, foreground_service_usage_consume_power,
background_usage_consume_power and cached_usage_consume_power into
database and pass them to UI.

Test: make RunSettingsRoboTests + manual
Bug: 256123455
Bug: 258124768
Change-Id: Ic46032f67eff5898f9d4182c517bbebe478eca01
This commit is contained in:
Kuan Wang
2022-11-21 10:41:02 +08:00
parent a6a7e029d7
commit 53a761f55b
14 changed files with 707 additions and 713 deletions

View File

@@ -629,6 +629,7 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
PowerGaugePreference preference, BatteryDiffEntry entry) {
final long foregroundUsageTimeInMs = entry.mForegroundUsageTimeInMs;
final long backgroundUsageTimeInMs = entry.mBackgroundUsageTimeInMs;
// TODO: update this value after the new API for foreground service is completed.
final long totalUsageTimeInMs = foregroundUsageTimeInMs + backgroundUsageTimeInMs;
String usageTimeSummary = null;
// Not shows summary for some system components without usage time.