From fb1e20dfe2a1252625ea59d4fd5ad4601b118d68 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Sun, 23 Jun 2013 21:24:13 -0700 Subject: [PATCH] Don't move stack with task for moveTaskToFront. Earlier CL, ag/321609, was overly aggressive. It should only have kept the stack from moving when moveTaskToStack() was called. Instead the change was applied to moveTaskToFront() as well. In order to remain consistent with earlier behavior of moveTaskToFront() the stack containing the task must move to the front as well. This movement launches the activity at the top of the task. Without the stack movement the activity never gets launched causing bug 9498455. Fixes bug 9498455. Change-Id: I2cb9119c23a226f7d211851df9e49f10f702b3ef --- services/java/com/android/server/am/ActivityStack.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 2d7a171cdddac..5e6bdb1ac7f18 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -2857,6 +2857,8 @@ final class ActivityStack { return; } + mStackSupervisor.moveHomeStack(isHomeStack()); + // Shift all activities with this task up to the top // of the stack, keeping them in the same internal order. mTaskHistory.remove(tr);