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

Commit fc776f80 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Fix LRU order in mLruProcesses in ProcessList.java

Binding isolated processes from a client process
in the order of 1,2,3,4,5 was putting the processes
in the LRU list in this order: [LRU]4,3,2,1,5,client[MRU].
But it actually needs to be [LRU]1,2,3,4,5,client[MRU].

This CL fixes that bug.

Bug: 356397711
Change-Id: Ifbda98b20a78fd9b62661c726510319fad692680
Test: atest CtsAppTestCases:ServiceTest#testActivityServiceBindingLru
Flag: EXEMPT bugfix
parent 5885c0fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3765,7 +3765,7 @@ public final class ProcessList {
                    boolean hasActivity = false;
                    int connUid = 0;
                    int connGroup = 0;
                    while (i >= bottomI) {
                    while (subProc.info.uid != uid) {
                        mLruProcesses.remove(i);
                        mLruProcesses.add(endIndex, subProc);
                        if (DEBUG_LRU) Slog.d(TAG_LRU,