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

Commit 1e52f216 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by android-build-merger
Browse files

Merge "Ignore entries for isolated uids if there's no mapping for them." into oc-dev am: 057bad9c

am: cefa28dc

Change-Id: I0dac209a9a5af6f5b83ea0d9706a29e5f6a97df4
parents 38bbd5aa cefa28dc
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -10175,7 +10175,16 @@ public class BatteryStatsImpl extends BatteryStats {
                new KernelUidCpuTimeReader.Callback() {
                    @Override
                    public void onUidCpuTime(int uid, long userTimeUs, long systemTimeUs) {
                        final Uid u = getUidStatsLocked(mapUid(uid));
                        uid = mapUid(uid);
                        if (Process.isIsolated(uid)) {
                            // This could happen if the isolated uid mapping was removed before
                            // that process was actually killed.
                            mKernelUidCpuTimeReader.removeUid(uid);
                            Slog.d(TAG, "Got readings for an isolated uid with"
                                    + " no mapping to owning uid: " + uid);
                            return;
                        }
                        final Uid u = getUidStatsLocked(uid);

                        // Accumulate the total system and user time.
                        mTempTotalCpuUserTimeUs += userTimeUs;
@@ -10340,7 +10349,11 @@ public class BatteryStatsImpl extends BatteryStats {

                    @Override
                    public void onUidCpuFreqTime(int uid, long[] cpuFreqTimeMs) {
                        final Uid u = getUidStatsLocked(mapUid(uid));
                        uid = mapUid(uid);
                        if (Process.isIsolated(uid)) {
                            return;
                        }
                        final Uid u = getUidStatsLocked(uid);
                        if (u.mCpuFreqTimeMs == null) {
                            u.mCpuFreqTimeMs = new LongSamplingCounterArray(mOnBatteryTimeBase);
                        }