From 97024321fcff3427e4e1cc6ced9b6abc7525fdb0 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 20 Mar 2014 10:08:04 -0700 Subject: [PATCH] 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 --- .../java/com/android/server/am/ActivityStackSupervisor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java index 62e1340443269..d616f1b66e7ab 100644 --- a/services/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/java/com/android/server/am/ActivityStackSupervisor.java @@ -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); }