Home | History | Annotate | Download | only in am

Lines Matching defs:Activity

86 import android.app.Activity;
167 // How long we wait until giving up on the last activity to pause. This
169 // next activity.
172 // How long we wait for the activity to tell us it has stopped before
177 // How long we wait until giving up on an activity telling us it has
185 // Set to false to disable the preview that is shown while a new activity
233 // Stack is considered visible, but only becuase it has activity that is visible behind other
281 * When we are in the process of pausing an activity, before starting the
282 * next one, this variable holds the activity that is currently being paused.
287 * This is the last activity that we put into the paused state. This is
288 * used to determine if we need to do an activity transition while sleeping,
289 * when we normally hold the top activity paused.
295 * If the device goes to sleep with such an activity in the paused state then we save it here
296 * and finish it later if another activity replaces it on wakeup.
301 * Current activity that is resumed, or null if there is none.
305 // The topmost Activity passed to convertToTranslucent(). When non-null it means we are
308 // Activity in mTranslucentActivityWaiting is notified via
309 // Activity.onTranslucentConversionComplete(false). If a timeout occurs prior to the last
310 // background activity being drawn then the same call will be made with a true value.
393 // We don't at this point know if the activity is fullscreen,
395 Slog.w(TAG, "Activity pause timeout for " + r);
413 // We don't at this point know if the activity is fullscreen,
415 Slog.w(TAG, "Activity destroy timeout for " + r);
422 // We don't at this point know if the activity is fullscreen,
424 Slog.w(TAG, "Activity stop timeout for " + r);
707 * @return Returns the HistoryRecord of the next activity on the stack.
913 // The stack isn't focusable. See if its top activity is focusable to force focus on the
924 * Returns the top activity in any existing task matching the given Intent in the input result.
959 if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Skipping " + task + ": mismatch activity type");
1018 * Returns the first activity (starting from the top of the stack) that
1019 * is the same as the given activity. Returns null if no such activity
1130 // Make sure that there is no activity waiting for this to launch.
1148 Slog.d(TAG, "awakeFromSleepingLocked: previously pausing activity didn't pause");
1179 // If we are in the middle of resuming the top activity in
1181 // resumed yet. We must not proceed pausing the activity here. This method will be
1185 if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "In the middle of resuming top activity "
1200 // Stop visible behind activity before going to sleep.
1214 // This ensures that the activity's onStop() is called.
1240 * Start pausing the currently resumed activity. It is an error to call this if there
1241 * is already an activity being paused or there is no resumed activity.
1243 * @param userLeaving True if this should result in an onUserLeaving to the current activity.
1246 * @param resuming The activity we are currently trying to resume or null if this is not being
1247 * called as part of resuming the top activity, so we shouldn't try to instigate
1249 * @param pauseImmediately True if the caller does not want to wait for the activity callback to
1251 * @return Returns true if an activity now is in the PAUSING state, and we are waiting for
1261 // Because activity will be paused immediately after resume, just let pause
1262 // be completed by the order of activity paused from clients.
1325 // awake until the next activity is started.
1332 // activity has started. If we're pausing the activity just because
1334 // key dispatch; the same activity will pick it up again on wakeup.
1353 // This activity failed to schedule the
1355 if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Activity not running, resuming next.");
1365 "Activity paused: token=" + token + ", timeout=" + timeout);
1389 "Executing finish of failed to pause activity: " + r);
1406 if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Executing finish of activity: " + prev);
1437 // It is possible the activity was freezing the screen before it was paused.
1438 // In that case go ahead and remove the freeze this activity has on the screen
1455 // something. Also if the top activity on the stack is not the just paused
1456 // activity, we need to go ahead and resume it to ensure we complete an
1504 // last of activity of the last task the stack will be empty and must
1521 // Find the first visible activity above the passed activity and if it is translucent return it
1552 final ActivityRecord activity = activities.get(activityNdx);
1553 if (!activity.finishing) {
1555 && currentTask.mFullscreen && activity.fullscreen ? null : activity;
1583 * starting (about to be visible) activity that is fullscreen (opaque).
1584 * @param starting The currently starting activity or null if there is none.
1602 // activity (about to be visible).
1607 // Stack isn't translucent if it has at least one fullscreen activity
1614 // Stack isn't translucent if it's top activity should have the home stack
1634 * @param starting The currently starting activity or null if there is none.
1661 // activity behind the home or recents stack that is translucent.
1705 // Stacks behind the fullscreen or assistant stack with a translucent activity are
1706 // always visible so they can act as a backdrop to the translucent activity.
1716 // complete backdrop to the translucent activity when the docked stack is up.
1778 // If the top activity is not fullscreen, then we need to
1795 // Normally the screenshot will be taken in makeInvisible(). When an activity
1811 // Check whether activity should be visible without Keyguard influence
1830 // First: if this is not the current activity being started, make
1847 // If this activity is already visible, then there is nothing to do here.
1871 // status of an activity in a previous task affects other.
1878 // No other task in the home stack should be visible behind the home activity.
1879 // Home activities is usually a translucent activity with the wallpaper behind
1891 // activity is going to be returning to an application activity type.
1893 // recents activity. The recents activity is normally translucent and if it
1894 // doesn't have the wallpaper behind it the next activity in the home stack
1896 // the recents activity from an app.
1920 * @return true if the top visible activity wants to occlude the Keyguard, false otherwise
1927 * @return the top most visible activity that wants to dismiss Keyguard
1952 // Only the top activity may control occluded, as we can't occlude the Keyguard if the
2013 // This activity needs to be visible, but isn't even running...
2059 // activity is hidden
2068 // translucent to opaque {@link Activity#convertToOpaque}.
2123 * Called as activities below the top translucent activity are redrawn. When the last one is
2124 * redrawn notify the top activity by calling
2125 * {@link Activity#onTranslucentConversionComplete}.
2127 * @param r The most recent background activity to be drawn. Or, if r is null then a timeout
2128 * occurred and the activity will be notified immediately.
2135 // The last undrawn activity below the top has just been drawn. If there is an
2136 // opaque activity at the top, notify it that it can become translucent safely now.
2156 * starting window displayed then remove that starting window. It is possible that the activity
2166 // The stack is not visible, so no activity in it should be displaying a starting
2191 * Ensure that the top activity in the stack is resumed.
2193 * @param prev The previously resumed activity, for when in the process
2195 * @param options Activity options.
2200 * NOTE: It is not safe to call this method directly as it can cause an activity in a
2203 * right activity for the current system state.
2219 // When resuming the top activity, it may be necessary to pause the top activity (for
2221 // {@link #resumeTopActivityUncheckedLocked}, since the top activity is resumed at the end.
2231 // there should only be 1 global copy of resumed activity.
2246 // Find the next top-most activity to resume in this stack that is not finishing and is
2248 // top activity in the next focusable task.
2276 // If the top activity is the resumed one, nothing to do.
2283 "resumeTopActivityLocked: Top activity resumed " + next);
2310 // If we are sleeping, and there is no resumed activity, and the top
2311 // activity is paused, well that is the state we want.
2324 // Make sure that the user who owns this activity is started. If not,
2328 Slog.w(TAG, "Skipping resume of top activity " + next
2334 // The activity may be waiting for stop, but that is no longer
2343 // If we are currently pausing an activity, then don't do anything until that is done.
2346 "resumeTopActivityLocked: Skip resume: some activity pausing.");
2357 // represent the last resumed activity. However, the last focus stack does if it isn't null.
2362 // If the flag RESUME_WHILE_PAUSING is set, then continue to schedule the previous activity
2363 // to be paused, while at the same time resuming the new resume activity only if the
2364 // previous activity can't go into Pip since we want to give Pip activities a chance to
2365 // enter Pip before resuming the next activity.
2378 // At this point we want to put the upcoming activity's process
2389 // It is possible for the activity to be resumed when we paused back stacks above if the
2390 // next activity doesn't have to wait for pause to complete.
2396 "resumeTopActivityLocked: Top activity resumed (dontWaitForPause) " + next);
2401 // If the most recent activity was noHistory but was only stopped rather
2403 // sure to finish it as we're making a new activity topmost.
2408 requestFinishActivityLocked(mLastNoHistoryActivity.appToken, Activity.RESULT_CANCELED,
2420 // The next activity is already visible, so hide the previous
2421 // activity's windows right now so we can show the new one ASAP.
2425 // the resumed activity to be shown so we can decide if the
2444 // Launching this app's activity, make sure the app is no longer
2455 // We are starting up the next activity, so tell the window manager
2512 // If the previous activity is translucent, force a visibility update of
2513 // the next activity, so that it's added to WM's opening app list, and
2515 // For example, pressing Home button with a translucent activity in focus.
2524 // This activity is now becoming visible.
2547 // the screen based on the new activity order.
2562 // instance of the activity, and instead started a new one.
2563 // We should be all done, but let's just make sure our activity
2568 "Activity config changed during resume: " + next
2618 // Whoops, need to restart this activity!
2639 // to recover the activity.
2644 // activity and try the next one.
2646 requestFinishActivityLocked(next.appToken, Activity.RESULT_CANCELED, null,
2652 // Whoops, need to restart this activity!
2673 // Try to move focus to the next visible stack with a running activity if this
2711 // If the task or starting activity can be shown, then whatever position is okay.
2792 // If this is being moved to the top by another activity or being launched from the home
2793 // activity, set mTaskToReturnTo accordingly.
2814 // Last activity in task had been removed or ActivityManagerService is reusing task.
2834 if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to task "
2847 // Place a new activity at top of stack, so it is next to interact with the user.
2849 // If we are not placing the new activity frontmost, we do not want to deliver the
2850 // onUserLeaving callback to the actual frontmost activity
2860 // Slot the activity into the history stack and proceed
2861 if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to stack to task " + task,
2883 // If a new task is being launched, then mark the existing top activity as
2897 // Even though this activity is starting fresh, we still need
2916 // Figure out if we are transitioning from another activity that is
2924 // (1) The current activity is in a different task.
2928 // (2) The current activity is already displayed.
2936 // If this is the first activity, don't do any fancy animations,
2953 * We are inside of the task being reset... we'll either finish this activity, push it out
2955 * @param task The task containing the Activity (taskTop) that might be reset.
2986 // If this activity is sending a reply to a previous
2987 // activity, we can't do anything with it now until
2990 // to the previous activity, which is almost always
3000 // If this activity has an affinity for another
3003 // bottom of the activity stack. This also keeps it
3012 // If the activity currently at the bottom has the
3016 if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Start pushing activity " + target
3023 if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Start pushing activity " + target
3043 "Removing activity " + p + " from task=" + task + " adding to task="
3046 "Pushing next activity " + p + " out to target's task " + target);
3054 // If the activity should just be removed -- either
3060 // In this case, we want to finish this activity
3085 p, Activity.RESULT_CANCELED, null, "reset-task", false)) {
3093 // activity that started it all doesn't want anything
3120 // Do not operate on or below the effective root Activity.
3131 // If this activity is sending a reply to a previous
3132 // activity, we can't do anything with it now until
3135 // to the previous activity, which is almost always
3144 // This activity has an affinity for our task. Either remove it if we are
3152 // someone starts an activity in a new task from an activity
3164 p, Activity.RESULT_CANCELED, null, "move-affinity", false);
3181 "Removing and adding activity " + p + " to stack at " + task
3183 if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Pulling activity " + p
3190 // a singleTop activity and we have put it on top of another
3191 // instance of the same activity? Then we drop the instance
3199 finishActivityLocked(p, Activity.RESULT_CANCELED, null, "replace",
3255 // If we got some ActivityOptions from an activity on top that
3275 if (DEBUG_RESULTS) Slog.v(TAG, "Send activity result to " + r
3299 // We got a top running activity, so there isn't a top finishing task...
3321 // stack as long as there is a running activity.
3325 // {@link ActivityRecord} will disassociate the task from the activity.
3329 throw new IllegalStateException("activity no longer associated with task:" + r);
3347 // Activity focus was already adjusted. Nothing else to do...
3378 // If we will be focusing on the home stack next and its current top activity isn't
3395 if (requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
3447 * @return Returns true if the activity is being finished, false if for
3454 "Finishing activity token=" + token + " r="
3473 finishActivityLocked(r, Activity.RESULT_CANCELED, null, "request-sub",
3488 Slog.w(TAG, " Force finishing activity "
3494 finishActivityLocked(r, Activity.RESULT_CANCELED, null, reason, false);
3498 // re-start our crashing activity once it gets resumed again.
3515 Slog.w(TAG, " Force finishing activity "
3517 finishActivityLocked(r, Activity.RESULT_CANCELED, null, reason, false);
3533 finishActivityLocked(r, Activity.RESULT_CANCELED, null, "finish-voice",
3571 finishActivityLocked(cur, Activity.RESULT_CANCELED, null, "request-affinity", true);
3617 * @return Returns true if this activity has been removed from the history
3639 // If the caller asked that this activity (and all above it)
3641 // but propagate it up to the next activity.
3678 // If the activity is PAUSING, we will complete the finish once
3690 // The following code is an optimization. When the last non-task overlay activity
3692 // since that is done after the scheduled destroy callback from the activity, that
3694 // sync with the activitiy visibility being set for this finishing activity above.
3730 // First things first: if this activity is currently visible,
3731 // and the resumed activity is not yet visible, then hold off on
3775 // Finishing activity that was in paused state and it was in not currently focused
3789 // activity into the stopped state and then finish it.
3824 // they need to re-create their task if this current activity is the root
3830 // Okay, this activity is at the root of its task. What to do, what to do...
3901 // Only return the supplied result for the first activity finished
3902 resultCode = Activity.RESULT_CANCELED;
3938 * an activity moves away from the stack.
3952 * Perform the common clean-up of an activity record. This is called both
3969 if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during cleanUp for activity " + r);
3973 // Inform supervisor the activity has been removed.
4013 finishActivityResultsLocked(r, Activity.RESULT_CANCELED, null);
4016 "Removing activity " + r + " from stack callers=" + Debug.getCallers(5));
4023 if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during remove for activity " + r);
4028 // If we are removing the last activity in the task, not including task overlay activities,
4036 "removeActivityFromHistoryLocked: last activity removed from " + this
4049 // When destroying a task, tell the supervisor to remove it so that any activity it
4071 * Perform clean-up of service connections in an activity record.
4074 // Throw away any services that have been bound by this activity.
4153 final ActivityRecord activity = activities.get(actNdx);
4154 if (activity.app == app && activity.isDestroyable()) {
4155 if (DEBUG_RELEASE) Slog.v(TAG_RELEASE, "Destroying " + activity
4156 + " in state " + activity.state + " resumed=" + mResumedActivity
4158 destroyActivityLocked(activity, true, reason);
4159 if (activities.get(actNdx) != activity) {
4181 * Destroy the current CLIENT SIDE instance of an activity. This may be
4182 * called both when actually finishing an activity, or when performing
4188 "Removing activity from " + reason + ": token=" + r
4238 // If the activity is finishing, we need to wait on removing it
4255 if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during destroy for activity " + r);
4266 if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during destroy for activity " + r);
4274 Slog.w(TAG, "Activity " + r + " being finished, but not in LRU list");
4306 // Don't release the top activity if it has requested to run behind the next
4307 // activity and the stack is currently visible.
4320 Slog.e(TAG, "releaseBackgroundResources: activity " + r + " no longer running");
4398 // Don't currently have state for the activity, or
4403 // We have launched this activity too many times since it was
4405 // (Note if the activity is visible, we don't remove the record.
4410 // The process may be gone, but the activity lives on!
4415 "Removing activity " + r + " from stack at " + i
4431 // We have the current state for this activity, so
4435 "Clearing app during removeHistory for activity " + r);
4440 // other apps when user transfers focus to the restarted activity.
4536 // Set focus to the top running activity of this stack.
4550 // If a new task is moved to the front, then mark the existing top activity as supporting
4613 // For the case where we are moving the home task back and there is an activity visible
4615 // visible behind activity to maintain order with what the user is seeing.
4636 // If true, we should resume the home activity next if the task we are moving to the
4665 // home activity. We make sure here that some activity in the stack will launch home.
4712 * Ensures all visible activities at or below the input activity have the right configuration.
4742 // Ensure the resumed state of the focus activity if we updated the configuration of
4743 // any activity.
4867 finishActivityLocked(r, Activity.RESULT_CANCELED, null, "close-sys", true);
4892 // If this activity is just finishing, then it is not
4907 Slog.i(TAG, " Force finishing activity " + r);
4915 if (finishActivityLocked(r, Activity.RESULT_CANCELED, null, "force-stop",
4994 if (DEBUG_SWITCH) Slog.d(TAG_SWITCH, "Performing unhandledBack(): top activity at " + top);
4999 finishActivityLocked(activities.get(activityTop), Activity.RESULT_CANCELED, null,
5006 * Reset local parameters because an app's activity died.
5007 * @param app The app of the activity that died.
5030 Slog.w(TAG, " Force finishing activity "
5140 // TODO: VI what about activity?
5308 // If the activity owns the last resumed activity, transfer that together,
5309 // so that we don't resume the same activity again in the new stack.
5315 // If the activity was previously pausing, then ensure we transfer that as well
5320 // Move the stack in which we are placing the activity to the front. The call will also
5321 // make sure the activity focus is set.