summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/am/ActivityStack.java
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2013-10-11 17:36:59 -0700
committerCraig Mautner <cmautner@google.com>2013-10-11 17:36:59 -0700
commit8e5695778f736e5fd8a82d7485967f3f21a94ccc (patch)
treefae34385874835718be686f06d66adf65d0b54a8 /services/java/com/android/server/am/ActivityStack.java
parent09cb9bdcc8949605e5a26ab50ac73970d1092978 (diff)
When removing a task that was on home, put home on top.
Killing an app that was launched from home was not relaunching home. Previous situations relaunched the next app (i.e. home) based on the task flag. However, when an app dies the relaunch is deferred until the TaskRecord has long been forgotten. This fix rearranges the stacks immediately upon the TaskRecord being removed from the stack. Then the next resumeTopActivities() call will start the home task. Fixes bug 11189555. Change-Id: I0e09350a7db55ea8b38cce7bf4b69923a6b99494
Diffstat (limited to 'services/java/com/android/server/am/ActivityStack.java')
-rw-r--r--services/java/com/android/server/am/ActivityStack.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 066989b8d631..525b7e12e196 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -2629,6 +2629,9 @@ final class ActivityStack {
if (DEBUG_STACK) Slog.i(TAG,
"removeActivityFromHistoryLocked: last activity removed from " + this);
mStackSupervisor.removeTask(task);
+ if (task.mOnTopOfHome) {
+ mStackSupervisor.moveHomeToTop();
+ }
}
r.takeFromHistory();
removeTimeoutsForActivityLocked(r);