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

Commit fa81de9b authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Potential fix for NPE in Running services." into ics-mr1

parents 1663522e b71efad6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -815,7 +815,7 @@ public class RunningState {
        // Build the chains from client processes to the process they are
        // dependent on; also remove any old running processes.
        int NRP = mRunningProcesses.size();
        for (int i=0; i<NRP; i++) {
        for (int i = 0; i < NRP;) {
            ProcessItem proc = mRunningProcesses.valueAt(i);
            if (proc.mRunningSeq == mSequence) {
                int clientPid = proc.mRunningProcessInfo.importanceReasonPid;
@@ -833,9 +833,11 @@ public class RunningState {
                    // we will detect the change.
                    proc.mClient = null;
                }
                i++;
            } else {
                changed = true;
                mRunningProcesses.remove(mRunningProcesses.keyAt(i));
                NRP--;
            }
        }