Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c3cb450 authored by ykhung's avatar ykhung Committed by YK Hung
Browse files

Hide running time information for "Android System" entry

Hide the running time information for "Android System" entry, since this
entry will combine multiple system components together. It will provide
incorrect running time information. The getRealUid() method maps many
UIDs to Process.SYSTEM_UID(1000), which results in combining all of
those UIDs into one "Android System" entry. This is the expected behavior.

Bug: 220717612
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I0aece0f1e86c36e55a2b5a966b4da9fdea14c748
parent 611db9e8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -424,6 +424,9 @@ public class BatteryAppListPreferenceController extends AbstractPreferenceContro

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