Merge "Make window mgr stack movement track activity mgr" into lmp-mr1-dev

This commit is contained in:
Craig Mautner
2014-12-18 19:55:49 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 8 deletions

View File

@@ -480,6 +480,10 @@ final class ActivityStack {
} }
mStacks.remove(this); mStacks.remove(this);
mStacks.add(this); mStacks.add(this);
final TaskRecord task = topTask();
if (task != null) {
mWindowManager.moveTaskToTop(task.taskId);
}
} }
} }
@@ -3478,11 +3482,10 @@ final class ActivityStack {
return; return;
} }
moveToFront();
// Shift all activities with this task up to the top // Shift all activities with this task up to the top
// of the stack, keeping them in the same internal order. // of the stack, keeping them in the same internal order.
insertTaskAtTop(tr); insertTaskAtTop(tr);
moveToFront();
if (DEBUG_TRANSITION) Slog.v(TAG, "Prepare to front transition: task=" + tr); if (DEBUG_TRANSITION) Slog.v(TAG, "Prepare to front transition: task=" + tr);
if (reason != null && if (reason != null &&
@@ -3497,8 +3500,6 @@ final class ActivityStack {
updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT, options); updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT, options);
} }
mWindowManager.moveTaskToTop(tr.taskId);
mStackSupervisor.resumeTopActivitiesLocked(); mStackSupervisor.resumeTopActivitiesLocked();
EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.userId, tr.taskId); EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, tr.userId, tr.taskId);

View File

@@ -2075,8 +2075,6 @@ public final class ActivityStackSupervisor implements DisplayListener {
final TaskRecord topTask = targetStack.topTask(); final TaskRecord topTask = targetStack.topTask();
if (topTask != sourceTask) { if (topTask != sourceTask) {
targetStack.moveTaskToFrontLocked(sourceTask, r, options); targetStack.moveTaskToFrontLocked(sourceTask, r, options);
} else {
mWindowManager.moveTaskToTop(topTask.taskId);
} }
if (!addingToTask && (launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) { if (!addingToTask && (launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
// In this case, we are adding the activity to an existing // In this case, we are adding the activity to an existing
@@ -2131,8 +2129,6 @@ public final class ActivityStackSupervisor implements DisplayListener {
} }
targetStack = inTask.stack; targetStack = inTask.stack;
targetStack.moveTaskToFrontLocked(inTask, r, options); targetStack.moveTaskToFrontLocked(inTask, r, options);
targetStack.moveToFront();
mWindowManager.moveTaskToTop(inTask.taskId);
// Check whether we should actually launch the new activity in to the task, // Check whether we should actually launch the new activity in to the task,
// or just reuse the current activity on top. // or just reuse the current activity on top.