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

Commit c067124e authored by Edgar Arriaga's avatar Edgar Arriaga
Browse files

Fix for crash in system_server due to IndexOutOfBoundsException

This became necessary since now we cancel compactions so it is possible
to have a list without elements when the compaction system is ready to
start a compaction.

Bug: 219901263
Test: Manual
Change-Id: I44d95d243ba95aea6c84283ddef1a38ffb6d3570
parent ebed2a6d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1105,6 +1105,9 @@ public final class CachedAppOptimizer {
                    int lastOomAdj = msg.arg1;
                    int procState = msg.arg2;
                    synchronized (mProcLock) {
                        if(mPendingCompactionProcesses.isEmpty()) {
                            return;
                        }
                        proc = mPendingCompactionProcesses.remove(0);
                        opt = proc.mOptRecord;