diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-04-14 19:02:00 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-14 19:02:00 -0700 |
commit | b0ef1442866ec52a772e6edfab732a2c987bbee0 (patch) | |
tree | f07b655e3c034e96f7e6a71d118ee2abb03d8a8d | |
parent | 5304d8fdc9064f2831ef16db9242f17110287997 (diff) | |
parent | b67fa45c26d5e4fc4d19a15868af348994bd6287 (diff) | |
download | frameworks_base-b0ef1442866ec52a772e6edfab732a2c987bbee0.zip frameworks_base-b0ef1442866ec52a772e6edfab732a2c987bbee0.tar.gz frameworks_base-b0ef1442866ec52a772e6edfab732a2c987bbee0.tar.bz2 |
Merge "Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET" into froyo
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 1486a1d..13690bc 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -4078,10 +4078,19 @@ public final class ActivityManagerService extends ActivityManagerNative implemen System.identityHashCode(r), r.task.taskId, r.shortComponentName, reason); r.task.numActivities--; - if (r.frontOfTask && index < (mHistory.size()-1)) { + if (index < (mHistory.size()-1)) { HistoryRecord next = (HistoryRecord)mHistory.get(index+1); if (next.task == r.task) { - next.frontOfTask = true; + if (r.frontOfTask) { + // The next activity is now the front of the task. + next.frontOfTask = true; + } + if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) != 0) { + // If the caller asked that this activity (and all above it) + // be cleared when the task is reset, don't lose that information, + // but propagate it up to the next activity. + next.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); + } } } |