am b0ef1442: Merge "Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET" into froyo
Merge commit 'b0ef1442866ec52a772e6edfab732a2c987bbee0' into froyo-plus-aosp * commit 'b0ef1442866ec52a772e6edfab732a2c987bbee0': Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
This commit is contained in:
@@ -4078,10 +4078,19 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
|||||||
System.identityHashCode(r),
|
System.identityHashCode(r),
|
||||||
r.task.taskId, r.shortComponentName, reason);
|
r.task.taskId, r.shortComponentName, reason);
|
||||||
r.task.numActivities--;
|
r.task.numActivities--;
|
||||||
if (r.frontOfTask && index < (mHistory.size()-1)) {
|
if (index < (mHistory.size()-1)) {
|
||||||
HistoryRecord next = (HistoryRecord)mHistory.get(index+1);
|
HistoryRecord next = (HistoryRecord)mHistory.get(index+1);
|
||||||
if (next.task == r.task) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user