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

Commit 5966a742 authored by Jing Ji's avatar Jing Ji
Browse files

Validate the ProcessRecord prior to insert to LRU list

If the process has been killed, there is no need to insert it to LRU
list.

Bug: 186829273
Test: atest CtsAppTestCases
Test: atest AutoRevokeTest
Change-Id: I5eeea731ce2080709cc9ba3c75c8a591e4ec10f0
parent 5f1fac6a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3418,6 +3418,11 @@ public final class ProcessList {
            return;
        }

        if (app.getPid() == 0 && !app.isPendingStart()) {
            // This process has been killed and its cleanup is done, don't proceed the LRU update.
            return;
        }

        synchronized (mProcLock) {
            updateLruProcessLSP(app, client, hasActivity, hasService);
        }