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

Commit 39c36cab authored by Erik Wolsheimer's avatar Erik Wolsheimer Committed by android-build-merger
Browse files

DO NOT MERGE Guard against null entries in process list during updateOomAdjLocked am: 84aa5a86

am: 36008dd6

Change-Id: Ia7e636049d4a3a0490013a54ffb90d7f4f534949
parents d0a937e8 36008dd6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21035,6 +21035,9 @@ public final class ActivityManagerService extends ActivityManagerNative
        int nextEmptyAdj = curEmptyAdj+2;
        for (int i=N-1; i>=0; i--) {
            ProcessRecord app = mLruProcesses.get(i);
            if (app == null) {
                continue;
            }
            if (!app.killedByAm && app.thread != null) {
                app.procStateChanged = false;
                computeOomAdjLocked(app, ProcessList.UNKNOWN_ADJ, TOP_APP, true, now);
@@ -21210,6 +21213,9 @@ public final class ActivityManagerService extends ActivityManagerNative
            int curLevel = ComponentCallbacks2.TRIM_MEMORY_COMPLETE;
            for (int i=N-1; i>=0; i--) {
                ProcessRecord app = mLruProcesses.get(i);
                if (app == null) {
                    continue;
                }
                if (allChanged || app.procStateChanged) {
                    setProcessTrackerStateLocked(app, trackerMemFactor, now);
                    app.procStateChanged = false;