summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-04-14 19:09:52 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-04-14 19:09:52 -0700
commitccb87e11da5ff4508ede1e4582a5d617fbe78a97 (patch)
tree5e453f20dd4f1ef7371cad3b625e2479efae4b06 /services
parent949c34854a92d1b507dfc833aa899055fd29db8d (diff)
parent68ca59e9e69ab4c997987fb0390382a2461386eb (diff)
downloadframeworks_base-ccb87e11da5ff4508ede1e4582a5d617fbe78a97.zip
frameworks_base-ccb87e11da5ff4508ede1e4582a5d617fbe78a97.tar.gz
frameworks_base-ccb87e11da5ff4508ede1e4582a5d617fbe78a97.tar.bz2
am 68ca59e9: am b0ef1442: Merge "Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET" into froyo
Merge commit '68ca59e9e69ab4c997987fb0390382a2461386eb' into kraken * commit '68ca59e9e69ab4c997987fb0390382a2461386eb': Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java13
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);
+ }
}
}