Lines Matching defs:task

131      * new task is created. */
288 prev.task.mOnTopOfHome = false;
306 TaskRecord task = stack.taskForIdLocked(id);
307 if (task != null) {
308 return task;
334 void removeTask(TaskRecord task) {
335 mWindowManager.removeTask(task.taskId);
336 final ActivityStack stack = task.stack;
338 if (r != null && r.task == task) {
341 if (stack.removeTask(task) && !stack.isHomeStack()) {
713 hist.task.taskId);
910 final ActivityStack stack = r.task.stack;
928 r.task.taskId, r.shortComponentName);
931 // Home process is the root process of the task.
932 mService.mHomeProcess = r.task.mActivities.get(0).app;
1050 r.task.stack.setLaunchTime(r);
1109 ActivityStack resultStack = resultRecord == null ? null : resultRecord.task.stack;
1254 final TaskRecord task = r.task;
1255 if (r.isApplicationActivity() || (task != null && task.isApplicationTask())) {
1256 if (task != null) {
1257 if (mFocusedStack != task.stack) {
1259 "adjustStackFocus: Setting focused stack to r=" + r + " task=" + task);
1260 mFocusedStack = task.stack;
1299 if (!r.isApplicationActivity() || (r.task != null && !r.task.isApplicationTask())) {
1309 "setFocusedStack: Setting focused stack to r=" + r + " task=" + r.task +
1311 mFocusedStack = r.task.stack;
1361 // case we -always- start a new task.
1370 // own task.
1375 // gets launched into its own task.
1383 // is because the task it is associated with may now be empty and on its way out,
1384 // so we don't want to blindly throw it in to that task. Instead we will take
1385 // the NEW_TASK flow and try to find a task for it.
1394 sourceStack = sourceRecord.task.stack;
1402 // task... yet the caller has requested a result back. Well, that
1404 // and let the new task continue launched as normal without a
1406 Slog.w(TAG, "Activity is launching as a new task, so cancelling activity result.");
1407 r.resultTo.task.stack.sendActivityResultLocked(-1,
1422 // we can find a task that was started with this same
1425 // See if there is a task to bring to the front. If this is
1428 // unique task, so we do a special search.
1433 if (r.task == null) {
1434 r.task = intentActivity.task;
1436 targetStack = intentActivity.task.stack;
1441 if (intentActivity.task.intent == null) {
1442 // This task was started because of movement of
1446 intentActivity.task.setIntent(intent, r.info);
1448 // If the target task is not in the front, then we need
1457 if (curTop != null && (curTop.task != intentActivity.task ||
1458 curTop.task != lastStack.topTask())) {
1461 sourceStack.topActivity().task == sourceRecord.task)) {
1469 intentActivity.task.mOnTopOfHome = true;
1471 targetStack.moveTaskToFrontLocked(intentActivity.task, r, options);
1475 // If the caller has requested that the target task be
1490 if (r.task == null) Slog.v(TAG,
1491 "startActivityUncheckedLocked: task left null",
1499 // existing task with its new activity. Well that should
1501 reuseTask = intentActivity.task;
1508 // from the task up to the one being started. In most
1509 // cases this means we are resetting the task to its
1512 intentActivity.task.performClearTaskLocked(r, launchFlags);
1517 // the task now has the identity of the new
1519 top.task.setIntent(r.intent, r.info);
1522 r, top.task);
1528 // current task to have this activity at the top.
1531 // by the top of its task, so it is put in the
1535 } else if (r.realActivity.equals(intentActivity.task.realActivity)) {
1536 // In this case the top activity on the task is the
1538 // as a request to bring the task to the foreground.
1539 // If the top activity in the task is the root
1546 intentActivity.task);
1548 intentActivity.task.setIntent(r.intent, r.info);
1551 } else if (!r.intent.filterEquals(intentActivity.task.intent)) {
1553 // of the task, but with a different intent. We
1560 // existing task, without resetting that task. This
1563 // the new activity on top of the current task.
1566 } else if (!intentActivity.task.rootWasReset) {
1567 // In this case we are launching in to an existing task
1569 // The current task has been brought to the front.
1570 // Ideally, we'd probably like to place this new task
1574 intentActivity.task.setIntent(r.intent, r.info);
1585 if (r.task == null) Slog.v(TAG,
1586 "startActivityUncheckedLocked: task left null",
1613 top.task);
1625 if (r.task == null) Slog.v(TAG,
1626 "startActivityUncheckedLocked: task left null",
1631 if (r.task == null) Slog.v(TAG,
1632 "startActivityUncheckedLocked: task left null",
1642 r.resultTo.task.stack.sendActivityResultLocked(-1, r.resultTo, r.resultWho,
1646 if (r.task == null) Slog.v(TAG,
1647 "startActivityUncheckedLocked: task left null",
1655 // Should this be considered a new task?
1663 if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r + " in new task " +
1664 r.task);
1675 r.task.mOnTopOfHome = true;
1679 TaskRecord sourceTask = sourceRecord.task;
1685 // task, but the caller has asked to clear that task if the
1690 ActivityStack.logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
1699 if (r.task == null) Slog.w(TAG,
1700 "startActivityUncheckedLocked: task left null",
1706 // In this case, we are launching an activity in our own task
1711 final TaskRecord task = top.task;
1712 task.moveActivityToFrontLocked(top);
1713 ActivityStack.logStartActivity(EventLogTags.AM_NEW_INTENT, r, task);
1724 // to keep the new one in the same task as the one that is starting
1728 + " in existing task " + r.task + " from source " + sourceRecord);
1732 // of a new task... just put it in the top task, though these days
1737 r.setTask(prev != null ? prev.task
1741 + " in new guessed " + r.task);
1748 EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, r.userId, r.task.taskId);
1750 ActivityStack.logStartActivity(EventLogTags.AM_CREATE_ACTIVITY, r, r.task);
1812 if (!mService.mBooted && isFrontStack(r.task.stack)) {
1887 final ActivityStack stack = r.task.stack;
1899 activityRemoved |= r.task.stack.destroyActivityLocked(r, true, false, "finish-idle");
2060 final TaskRecord task = anyTaskForIdLocked(taskId);
2061 if (task == null) {
2069 removeTask(task);
2070 stack.addTask(task, toTop);
2076 if (DEBUG_TASKS) Slog.d(TAG, "Looking for task of " + r);
2088 if (DEBUG_TASKS) Slog.d(TAG, "No task found");
2218 final ActivityStack stack = r.task.stack;
2484 if (lastTask != r.task) {
2485 lastTask = r.task;