Also clear the foreground service usage time for BatteryDiffEntry should hide background usage time.

- Usage time in background is the sum{bg + fgs} usage time

Bug: 371919020
Fix: 371919020
Test: atest DataProcessorTest
Flag: EXEMPT for simple fix
Change-Id: I058d8511eac7510e2df6d9ac1713824cd8dbf3ba
This commit is contained in:
mxyyiyi
2024-10-09 13:31:18 +08:00
parent f4a3bd1487
commit c3b20d3a31
2 changed files with 60 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ public class BatteryDiffData {
}
if (packageName != null && hideBackgroundUsageTimeSet.contains(packageName)) {
entry.mBackgroundUsageTimeInMs = 0;
entry.mForegroundServiceUsageTimeInMs = 0;
}
}
}