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

Remove trimmable tasks on activity idle

Previously, the unreachable/inactive tasks may be removed when
adding a task to recents list. That may causes the indirect caller
to encounter index out of bounds exception when iteration tasks.

Because activity-idle should be a standalone event that it should
not be called in any loop, and it is also the place to handle
stopping and finishing activities. So it is a relatively safe place
to remove the trimmable tasks. Besides, the movement of invocation
may avoid additional time when launching activity that triggers trim.

Also simplify the setup of RecentTasksTest to reduce 60%+ execution
time of the test class.

Bug: 169124675
Test: atest RecentTasksTest
Change-Id: I49003b834ac55a44bf36ad59f920d4e662f9e427
parent efd3defd
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