Pass correct task to window manager

The target task when starting is not always the top task. If it's not
the window manager gets into a bad state.

Fixes bug 14684143.

Change-Id: I90145ae43bdc5d980dc25ac19e12aa84debfed71
This commit is contained in:
Craig Mautner
2014-05-17 15:13:28 -07:00
parent e4f1960652
commit abcc59c32f

View File

@@ -1818,7 +1818,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
}
targetStack = sourceTask.stack;
targetStack.moveToFront();
mWindowManager.moveTaskToTop(sourceTask.taskId);
mWindowManager.moveTaskToTop(targetStack.topTask().taskId);
if (!addingToTask &&
(launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
// In this case, we are adding the activity to an existing