Skip to content
Commit 61c9e5a6 authored by Winson Chung's avatar Winson Chung
Browse files

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
parent bb18e329
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