Lines Matching refs:task
282 void addTask(Task task, boolean toTop) {
283 addTask(task, toTop, task.showForAllUsers());
288 * @param task The task to add.
290 * @param showForAllUsers Whether to show the task regardless of the current user.
292 void addTask(Task task, boolean toTop, boolean showForAllUsers) {
298 if (!showForAllUsers && !mService.isCurrentProfileLocked(task.mUserId)) {
299 // Place the task below all current user tasks.
307 // Put it above first non-current user task.
311 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "addTask: task=" + task + " toTop=" + toTop
313 mTasks.add(stackNdx, task);
315 task.mStack = this;
319 EventLog.writeEvent(EventLogTags.WM_TASK_MOVED, task.mTaskId, toTop ? 1 : 0, stackNdx);
322 void moveTaskToTop(Task task) {
323 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "moveTaskToTop: task=" + task + " Callers="
325 mTasks.remove(task);
326 addTask(task, true);
329 void moveTaskToBottom(Task task) {
330 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "moveTaskToBottom: task=" + task);
331 mTasks.remove(task);
332 addTask(task, false);
338 * @param task The Task to delete.
340 void removeTask(Task task) {
341 if (DEBUG_TASK_MOVEMENT) Slog.d(TAG, "removeTask: task=" + task);
342 mTasks.remove(task);
351 if (wtoken.mTask == task) {
504 Task task = mTasks.get(taskNdx);
505 if (mService.isCurrentProfileLocked(task.mUserId) || task.showForAllUsers()) {
507 mTasks.add(task);