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

Commit c32e3275 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Don't crash in batterystats"

parents f47f8bc3 898c4dc5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1378,13 +1378,13 @@ public final class BatteryStatsImpl extends BatteryStats {
                for (int i=0; i<N; i++) {
                    StopwatchTimer st = mPartialTimers.get(i);
                    if (st.mInList) {
                        Uid uid = st.mUid;
                        if (uid != null && uid.mUid != Process.SYSTEM_UID) {
                            int myUTime = utime/num;
                            int mySTime = stime/num;
                            utime -= myUTime;
                            stime -= mySTime;
                            num--;
                        Uid uid = st.mUid;
                        if (uid != null && uid.mUid != Process.SYSTEM_UID) {
                            Uid.Proc proc = uid.getProcessStatsLocked("*wakelock*");
                            proc.addCpuTimeLocked(myUTime, mySTime);
                            proc.addSpeedStepTimes(cpuSpeedTimes);