Lines Matching defs:tasks

82  * A list of filtered tasks.
129 // filtered tasks
134 /** Sets the list of tasks */
135 void set(List<Task> tasks) {
137 mTasks.addAll(tasks);
151 /** Returns the index of this task in the list of filtered tasks */
159 /** Returns the size of the list of filtered tasks */
169 /** Updates the list of filtered tasks whenever the base task list changes */
193 /** Updates the mapping of tasks to indices. */
208 /** Returns the list of filtered tasks */
215 * The task stack contains a list of multiple tasks.
235 * Notifies when all tasks have been removed from the stack.
240 * Notifies when tasks in the stack have been updated.
520 // A comparator that sorts tasks by their freeform state
545 // Ensure that we only show non-docked tasks
577 // Insert freeform tasks at the front
624 * Removes all tasks from the stack.
627 ArrayList<Task> tasks = mStackTaskList.getTasks();
628 for (int i = tasks.size() - 1; i >= 0; i--) {
629 Task t = tasks.get(i);
634 // Notify that all tasks have been removed
640 * Sets a few tasks in one go, without calling any callbacks.
642 * @param tasks the new set of tasks to replace the current set.
643 * @param notifyStackChanges whether or not to callback on specific changes to the list of tasks.
645 public void setTasks(Context context, List<Task> tasks, boolean notifyStackChanges) {
646 // Compute a has set for each of the tasks
648 ArrayMap<Task.TaskKey, Task> newTasksMap = createTaskKeyMapFromList(tasks);
658 // Remove any tasks that no longer exist
670 // Add any new tasks
671 taskCount = tasks.size();
673 Task newTask = tasks.get(i);
686 // Sort all the tasks to ensure they are ordered correctly
698 // Only callback for the removed tasks after the stack has updated
706 // Only callback for the newly added tasks after this stack has been updated
738 ArrayList<Task> tasks = computeAllTasksList();
739 int taskCount = tasks.size();
741 Task task = tasks.get(i);
748 * Returns the set of "active" (non-historical) tasks in the stack that have been used recently.
755 * Returns the set of "freeform" tasks in the stack.
759 ArrayList<Task> tasks = mStackTaskList.getTasks();
760 int taskCount = tasks.size();
762 Task task = tasks.get(i);
771 * Computes a set of all the active and historical tasks.
774 ArrayList<Task> tasks = new ArrayList<>();
775 tasks.addAll(mStackTaskList.getTasks());
776 return tasks;
780 * Returns the number of stack and freeform tasks.
787 * Returns the number of stack tasks.
790 ArrayList<Task> tasks = mStackTaskList.getTasks();
792 int taskCount = tasks.size();
794 Task task = tasks.get(i);
803 * Returns the number of freeform tasks.
806 ArrayList<Task> tasks = mStackTaskList.getTasks();
808 int taskCount = tasks.size();
810 Task task = tasks.get(i);
819 * Returns the task in stack tasks which is the launch target.
822 ArrayList<Task> tasks = mStackTaskList.getTasks();
823 int taskCount = tasks.size();
825 Task task = tasks.get(i);
840 ArrayList<Task> tasks = computeAllTasksList();
841 int taskCount = tasks.size();
843 Task task = tasks.get(i);
878 // Sort all tasks by increasing firstActiveTime of the task
879 ArrayList<Task> tasks = mStackTaskList.getTasks();
880 Collections.sort(tasks, new Comparator<Task>() {
888 int taskCount = tasks.size();
894 Task t = tasks.get(i);
920 // Sort group tasks by increasing firstActiveTime of the task, and also build a new list
921 // of tasks
935 tasks.set(taskIndex, taskMap.get(groupTasks.get(j)));
939 mStackTaskList.set(tasks);
943 ArrayList<Task> tasks = mStackTaskList.getTasks();
944 int taskCount = tasks.size();
946 Task t = tasks.get(i);
988 * Computes the components of tasks in this stack that have been removed as a result of a change
992 // Identify all the tasks that should be removed as a result of the package being removed.
1024 ArrayList<Task> tasks = mStackTaskList.getTasks();
1025 int taskCount = tasks.size();
1027 str += " " + tasks.get(i).toString() + "\n";
1033 * Given a list of tasks, returns a map of each task's key to the task.
1035 private ArrayMap<Task.TaskKey, Task> createTaskKeyMapFromList(List<Task> tasks) {
1036 ArrayMap<Task.TaskKey, Task> map = new ArrayMap<>(tasks.size());
1037 int taskCount = tasks.size();
1039 Task task = tasks.get(i);
1051 ArrayList<Task> tasks = mStackTaskList.getTasks();
1052 int taskCount = tasks.size();
1054 tasks.get(i).dump(innerPrefix, writer);