Use a local list to handle removing process

Currently there is no such case. Just add the protection in case
that more than one records are removed in the loop or new records
are added into the list.

Bug: 348091237
Flag: EXEMPT bugfix
Test: Launch multiple activities of the same process which belongs
      to a process stuck Application#onCreate.
      Hard code in finishIfPossible to invoke onRemovedFromDisplay
      for other records.
Change-Id: Ieef48ea9f5c3a7e5d489f2368378ae37bbec6315
1 file changed