Provide foreground_service usage time in BatteryDiffEntry.

- Fetch foreground service info through new api from UidBatteryConsumer.
- Record fgs & bg usage time separately, combine them till ui display.

Bug: 315255868
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.*"
Change-Id: Ic19844db7908a6ae6522c7a72972f44f94dcfca4
This commit is contained in:
mxyyiyi
2023-12-07 15:23:08 +08:00
parent dd2cc366a6
commit a919306d75
19 changed files with 345 additions and 158 deletions

View File

@@ -400,7 +400,7 @@ public class BatteryUsageBreakdownController extends BasePreferenceController
mPrefContext,
entry.isSystemEntry(),
entry.mForegroundUsageTimeInMs,
entry.mBackgroundUsageTimeInMs,
entry.mBackgroundUsageTimeInMs + entry.mForegroundServiceUsageTimeInMs,
entry.mScreenOnTimeInMs));
}
}