From 00a2725683177e97e02f474332a1b64dafa0ceba Mon Sep 17 00:00:00 2001 From: "raysb.kim" Date: Tue, 11 Nov 2014 08:38:21 +0900 Subject: [PATCH] Only one task within the stack should moveToBack In case of the last stack of application move to back, ONLY one stack within stack should move to back. but stack itseft move to back. Default bahavior of ActivityManager is that the stack will go back within stack when the last stack of application move to back. The stack is managed by DisplayContent of WindowManagerService should be same but taking one more action that move stack itself. Change-Id: If394ddf16b0fcda2ae3252e8f3b5336322ef6808 Signed-off-by: Seunghyun Lee --- services/core/java/com/android/server/wm/TaskStack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java index 238c77e039296..802cf4bb119f4 100644 --- a/services/core/java/com/android/server/wm/TaskStack.java +++ b/services/core/java/com/android/server/wm/TaskStack.java @@ -191,7 +191,9 @@ public class TaskStack { mTasks.add(stackNdx, task); task.mStack = this; - mDisplayContent.moveStack(this, true); + if (toTop) { + mDisplayContent.moveStack(this, true); + } EventLog.writeEvent(EventLogTags.WM_TASK_MOVED, task.taskId, toTop ? 1 : 0, stackNdx); }