Minor cleanup in RecentTasksList.java

Change-Id: I8a496300c936e4d3f2bcd6b0c6c482e5bbb0452d
This commit is contained in:
Andy Wickham 2020-05-13 09:32:42 -07:00
parent 794ca4dba5
commit 65381300f2
1 changed files with 2 additions and 5 deletions

View File

@ -154,8 +154,7 @@ public class RecentTasksList extends TaskStackChangeListener {
* Loads and creates a list of all the recent tasks.
*/
@VisibleForTesting
ArrayList<Task> loadTasksInBackground(int numTasks,
boolean loadKeysOnly) {
ArrayList<Task> loadTasksInBackground(int numTasks, boolean loadKeysOnly) {
int currentUserId = Process.myUserHandle().getIdentifier();
ArrayList<Task> allTasks = new ArrayList<>();
List<ActivityManager.RecentTaskInfo> rawTasks =
@ -174,9 +173,7 @@ public class RecentTasksList extends TaskStackChangeListener {
}
};
int taskCount = rawTasks.size();
for (int i = 0; i < taskCount; i++) {
ActivityManager.RecentTaskInfo rawTask = rawTasks.get(i);
for (ActivityManager.RecentTaskInfo rawTask : rawTasks) {
Task.TaskKey taskKey = new Task.TaskKey(rawTask);
Task task;
if (!loadKeysOnly) {