5/Organize and make running tasks code more efficient
- Move running task code from stack/supervisor into its own class
- Reduce work to calculate running tasks. Instead of creating RunningTaskInfo
for every single task and then limiting to the requested set, calculate
the set and then create the infos.
- Consolidate calculation of number of running activities in a task between
the RecentTaskInfo and the RunningTaskInfo
- Remove unused flag argument, adding another method to instead filter the
collection of running tasks to exclude certain activity types and windowing
modes. This allows us to fetch only the last running task in SystemUI and
not have additional logic on our side.
Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
Change-Id: Iaba7487cea0545f69739da7cd3095b500a0df6fc
12 files changed