Lines Matching refs:next

96     // next activity.
170 * next one, this variable holds the activity that is currently being paused.
376 * @return Returns the HistoryRecord of the next activity on the stack.
746 final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
747 if (next == null || next.task != prev.task) {
777 // awake until the next activity is started.
804 if (DEBUG_PAUSE) Slog.v(TAG, "Activity not running, resuming next.");
956 private void completeResumeLocked(ActivityRecord next) {
957 next.idle = false;
958 next.results = null;
959 next.newIntents = null;
960 if (next.nowVisible) {
966 mStackSupervisor.scheduleIdleTimeoutLocked(next);
968 mStackSupervisor.reportResumedActivityLocked(next);
970 next.resumeKeyDispatchingLocked();
976 if (next.app != null) {
978 next.cpuTimeAtResume = mService.mProcessCpuTracker.getCpuTimeForPid(next.app.pid);
981 next.cpuTimeAtResume = 0; // Couldn't get the cpu time of process
1131 // visible when it next restarts.
1189 // visible when it next restarts.
1255 ActivityRecord next = topRunningActivityLocked(null);
1262 if (next == null) {
1271 next.delayedResume = false;
1274 if (mResumedActivity == next && next.state == ActivityState.RESUMED &&
1281 if (DEBUG_STATES) Slog.d(TAG, "resumeTopActivityLocked: Top activity resumed " + next);
1286 final TaskRecord nextTask = next.task;
1298 if (DEBUG_STATES) Slog.d(TAG, "resumeTopActivityLocked: Launching home next");
1306 && mLastPausedActivity == next
1321 if (mService.mStartedUsers.get(next.userId) == null) {
1322 Slog.w(TAG, "Skipping resume of top activity " + next
1323 + ": user " + next.userId + " is stopped");
1330 mStackSupervisor.mStoppingActivities.remove(next);
1331 mStackSupervisor.mGoingToSleepActivities.remove(next);
1332 next.sleeping = false;
1333 mStackSupervisor.mWaitingVisibleActivities.remove(next);
1335 next.updateOptionsLocked(options);
1337 if (DEBUG_SWITCH) Slog.v(TAG, "Resuming " + next);
1348 // Okay we are now going to start a switch, to 'next'. We may first
1350 // where we have decided to go to 'next' so keep track of that.
1359 final int nextUid = next.info.applicationInfo.uid;
1361 && lastUid != next.launchedFromUid
1364 -1, next.launchedFromUid)
1366 mService.showLaunchWarningLocked(mLastStartedActivity, next);
1368 next.startTime = now;
1369 mLastStartedActivity = next;
1372 next.startTime = SystemClock.uptimeMillis();
1373 mLastStartedActivity = next;
1392 if (next.app != null && next.app.thread != null) {
1395 mService.updateLruProcessLocked(next.app, true, null);
1413 if (prev != null && prev != next) {
1414 if (!prev.waitingVisible && next != null && !next.nowVisible) {
1420 // The next activity is already visible, so hide the previous
1433 + ", nowVisible=" + next.nowVisible);
1438 + ", nowVisible=" + next.nowVisible);
1447 next.packageName, false, next.userId); /* TODO: Verify if correct userid */
1451 + next.packageName + ": " + e);
1454 // We are starting up the next activity, so tell the window manager
1466 mWindowManager.prepareAppTransition(prev.task == next.task
1474 if (mNoAnimActivities.contains(next)) {
1478 mWindowManager.prepareAppTransition(prev.task == next.task
1489 if (mNoAnimActivities.contains(next)) {
1497 next.applyOptionsLocked();
1499 next.clearOptionsLocked();
1503 if (next.app != null && next.app.thread != null) {
1504 if (DEBUG_SWITCH) Slog.v(TAG, "Resume running: " + next);
1507 mWindowManager.setAppVisibility(next.appToken, true);
1510 next.startLaunchTickingLocked();
1514 ActivityState lastState = next.state;
1518 if (DEBUG_STATES) Slog.v(TAG, "Moving to RESUMED: " + next + " (in existing)");
1519 next.state = ActivityState.RESUMED;
1520 mResumedActivity = next;
1521 next.task.touchActiveTime();
1522 mService.addRecentTaskLocked(next.task);
1523 mService.updateLruProcessLocked(next.app, true, null);
1524 updateLRUListLocked(next);
1533 next.mayFreezeScreenLocked(next.app) ? next.appToken : null);
1535 next.frozenBeforeDestroy = true;
1537 notUpdated = !mService.updateConfigurationLocked(config, next, false, false);
1548 "Activity config changed during resume: " + next
1549 + ", new next: " + nextNext);
1550 if (nextNext != next) {
1554 if (mStackSupervisor.reportResumedActivityLocked(next)) {
1565 ArrayList<ResultInfo> a = next.results;
1568 if (!next.finishing && N > 0) {
1570 TAG, "Delivering results to " + next
1572 next.app.thread.scheduleSendResult(next.appToken, a);
1576 if (next.newIntents != null) {
1577 next.app.thread.scheduleNewIntent(next.newIntents, next.appToken);
1581 next.userId, System.identityHashCode(next),
1582 next.task.taskId, next.shortComponentName);
1584 next.sleeping = false;
1585 mService.showAskCompatModeDialogLocked(next);
1586 next.app.pendingUiClean = true;
1587 next.app.forceProcessStateUpTo(ActivityManager.PROCESS_STATE_TOP);
1588 next.app.thread.scheduleResumeActivity(next.appToken, next.app.repProcState,
1593 if (DEBUG_STATES) Slog.d(TAG, "resumeTopActivityLocked: Resumed " + next);
1597 + lastState + ": " + next);
1598 next.state = lastState;
1602 Slog.i(TAG, "Restarting because process died: " + next);
1603 if (!next.hasBeenLaunched) {
1604 next.hasBeenLaunched = true;
1608 next.appToken, next.packageName, next.theme,
1609 mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),
1610 next.nonLocalizedLabel, next.labelRes, next.icon, next.logo,
1611 next.windowFlags, null, true);
1613 mStackSupervisor.startSpecificActivityLocked(next, true, false);
1621 next.visible = true;
1622 completeResumeLocked(next);
1625 // activity and try the next one.
1626 Slog.w(TAG, "Exception thrown during resume of " + next, e);
1627 requestFinishActivityLocked(next.appToken, Activity.RESULT_CANCELED, null,
1632 next.stopped = false;
1636 if (!next.hasBeenLaunched) {
1637 next.hasBeenLaunched = true;
1641 next.appToken, next.packageName, next.theme,
1643 next.info.applicationInfo),
1644 next.nonLocalizedLabel,
1645 next.labelRes, next.icon, next.logo, next.windowFlags,
1648 if (DEBUG_SWITCH) Slog.v(TAG, "Restarting: " + next);
1650 if (DEBUG_STATES) Slog.d(TAG, "resumeTopActivityLocked: Restarting " + next);
1651 mStackSupervisor.startSpecificActivityLocked(next, true, true);
1725 // Place a new activity at top of stack, so it is next to interact
1748 // switching to a new task, or the next activity's process is
1789 // "has the same starting icon" as the next one. This allows the
1961 if (DEBUG_TASKS) Slog.v(TAG, "Pushing next activity " + p
2211 ActivityRecord next = topRunningActivityLocked(null);
2212 if (next != r) {
2410 // but propagate it up to the next activity.
2411 ActivityRecord next = activities.get(index+1);
2412 next.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
2549 ActivityRecord next = topRunningActivityLocked(srec.appToken, 0);
2550 if (next != null) {
2554 resumeOK = controller.activityResuming(next.packageName);
2706 ConnectionRecord c = it.next();
3088 ActivityRecord next = topRunningActivityLocked(null, taskId);
3089 if (next == null) {
3090 next = topRunningActivityLocked(null, 0);
3092 if (next != null) {
3096 moveOK = mService.mController.activityResuming(next.packageName);
3224 // configuration and it will pick that up next time it starts.
3425 // Initialize state for next task if needed.