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

Skip to content
Commit a431c22f authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Make the removal in finish-package-activities deterministic

Sometimes the removal of activity may be deferred by animating.
And it is possible that the deferred record is removed with
another finishing activity (finishIfPossible ->
performSurfacePlacement -> handleCompleteDeferredRemoval) that
causes index of bounds in forAllActivities (next index is
size-1, but the size becomes size-2).

Now the activities to finish are collected to an independent list
so it won't be affected by any changes of hierarchy containers.

The checking for home activity can also be removed because if
home is restarted, it won't appear in the collected list.

Bug: 160752989
Test: ActivityStackTests# \
      testFinishDisabledPackageActivities_FinishAliveActivities
      testFinishDisabledPackageActivities_RemoveNonAliveActivities

Change-Id: I2fcbac35fb23295cfe54856c5f08eae97fa6b87f
parent f0d49561
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment