Move task to top in window manager.

In certain situations it was possible for a task to move to the top
in activity manager but not in window manager. This resulted in
the task appearing behind the launcher icons.

Fixes bug 13410184.

Change-Id: If0582b395e126a8aff70a0e4c64b731083c6ae8a
This commit is contained in:
Craig Mautner
2014-03-20 10:08:04 -07:00
parent b78dc69c2b
commit 97024321fc

View File

@@ -1709,6 +1709,7 @@ public final class ActivityStackSupervisor {
TaskRecord sourceTask = sourceRecord.task;
targetStack = sourceTask.stack;
moveHomeStack(targetStack.isHomeStack());
mWindowManager.moveTaskToTop(sourceTask.taskId);
if (!addingToTask &&
(launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
// In this case, we are adding the activity to an existing
@@ -1767,6 +1768,7 @@ public final class ActivityStackSupervisor {
r.setTask(prev != null ? prev.task
: targetStack.createTaskRecord(getNextTaskId(), r.info, intent, true),
null, true);
mWindowManager.moveTaskToTop(r.task.taskId);
if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+ " in new guessed " + r.task);
}