Merge "Wait for animation done when sleeping" into rvc-dev
This commit is contained in:
@@ -72,6 +72,7 @@ import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_N
|
|||||||
import static com.android.server.wm.RootWindowContainer.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS;
|
import static com.android.server.wm.RootWindowContainer.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS;
|
||||||
import static com.android.server.wm.RootWindowContainer.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
|
import static com.android.server.wm.RootWindowContainer.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
|
||||||
import static com.android.server.wm.RootWindowContainer.TAG_STATES;
|
import static com.android.server.wm.RootWindowContainer.TAG_STATES;
|
||||||
|
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
|
||||||
import static com.android.server.wm.Task.FLAG_FORCE_HIDDEN_FOR_PINNED_TASK;
|
import static com.android.server.wm.Task.FLAG_FORCE_HIDDEN_FOR_PINNED_TASK;
|
||||||
import static com.android.server.wm.Task.LOCK_TASK_AUTH_LAUNCHABLE;
|
import static com.android.server.wm.Task.LOCK_TASK_AUTH_LAUNCHABLE;
|
||||||
import static com.android.server.wm.Task.LOCK_TASK_AUTH_LAUNCHABLE_PRIV;
|
import static com.android.server.wm.Task.LOCK_TASK_AUTH_LAUNCHABLE_PRIV;
|
||||||
@@ -1803,15 +1804,11 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
|
|||||||
ArrayList<ActivityRecord> readyToStopActivities = null;
|
ArrayList<ActivityRecord> readyToStopActivities = null;
|
||||||
for (int i = mStoppingActivities.size() - 1; i >= 0; --i) {
|
for (int i = mStoppingActivities.size() - 1; i >= 0; --i) {
|
||||||
final ActivityRecord s = mStoppingActivities.get(i);
|
final ActivityRecord s = mStoppingActivities.get(i);
|
||||||
final boolean animating = s.isAnimating(TRANSITION | PARENTS);
|
final boolean animating = s.isAnimating(TRANSITION | PARENTS,
|
||||||
|
ANIMATION_TYPE_APP_TRANSITION);
|
||||||
if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + s.nowVisible
|
if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + s.nowVisible
|
||||||
+ " animating=" + animating + " finishing=" + s.finishing);
|
+ " animating=" + animating + " finishing=" + s.finishing);
|
||||||
|
if (!animating || mService.mShuttingDown) {
|
||||||
final ActivityStack stack = s.getRootTask();
|
|
||||||
final boolean shouldSleepOrShutDown = stack != null
|
|
||||||
? stack.shouldSleepOrShutDownActivities()
|
|
||||||
: mService.isSleepingOrShuttingDownLocked();
|
|
||||||
if (!animating || shouldSleepOrShutDown) {
|
|
||||||
if (!processPausingActivities && s.isState(PAUSING)) {
|
if (!processPausingActivities && s.isState(PAUSING)) {
|
||||||
// Defer processing pausing activities in this iteration and reschedule
|
// Defer processing pausing activities in this iteration and reschedule
|
||||||
// a delayed idle to reprocess it again
|
// a delayed idle to reprocess it again
|
||||||
|
|||||||
Reference in New Issue
Block a user