Merge "Hide running time information for "Android System" entry" into tm-dev am: fc6cb73d29 am: 964aeabd9e am: 01b9111333

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18062824

Change-Id: Ib213107e0a5e568174b26730a3aec15f45219fd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-04-29 19:33:06 +00:00
committed by Automerger Merge Worker

View File

@@ -424,6 +424,9 @@ public class BatteryAppListPreferenceController extends AbstractPreferenceContro
@VisibleForTesting @VisibleForTesting
void setUsageSummary(Preference preference, BatteryEntry entry) { void setUsageSummary(Preference preference, BatteryEntry entry) {
if (entry.getUid() == Process.SYSTEM_UID) {
return;
}
// Only show summary when usage time is longer than one minute // Only show summary when usage time is longer than one minute
final long usageTimeMs = entry.getTimeInForegroundMs(); final long usageTimeMs = entry.getTimeInForegroundMs();
if (shouldShowSummary(entry) && usageTimeMs >= DateUtils.MINUTE_IN_MILLIS) { if (shouldShowSummary(entry) && usageTimeMs >= DateUtils.MINUTE_IN_MILLIS) {