OSDN Git Service

Proper fix for the LRU IndexOutOfBoundsException
authorJing Ji <jji@google.com>
Tue, 20 Aug 2019 23:49:08 +0000 (16:49 -0700)
committerJing Ji <jji@google.com>
Wed, 21 Aug 2019 00:17:29 +0000 (17:17 -0700)
commitd3556f1bc23285110712166c3fe31f2e5736a02d
treefee6ecd7317e054cd77aaad2d315d05b7e6b98d4
parenta1b1d3b9150537d31524e9005a83bd13420d2071
Proper fix for the LRU IndexOutOfBoundsException

Previous fix for b/126427214 would result that the target process
being inserted gets falling out of the "Activities" section. A
proper fix should be in the remove LRU process part.

Also fixed an issue during the update of client activities:
when the sub proc should be sitting at the end of the group,
ineeded it's getting inserted to a position before end index
which could be pointing to a different process group, therefore
the end result would be "mixed" group.

Bug: 139765319
Test: atest CtsAppTestCases:ServiceTest\#testActivityServiceBindingLru
      manual: launch many apps and check the activity lru dump.

Change-Id: Ic56e38854837a07b8dabd1d19ba35eb1bfe4fd7a
services/core/java/com/android/server/am/ProcessList.java