diff options
author | Craig Mautner <cmautner@google.com> | 2014-03-28 20:23:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-28 20:23:34 +0000 |
commit | ff3362f0d8378d616f39cbcf8b86b6f03e7d30b9 (patch) | |
tree | 86abf57f42539f0ceff15bff7308c37cb1892d61 /services | |
parent | 49c061501dbcff0dd6f6621afa76136d0857622a (diff) | |
parent | 739e1941217b0882560f78169e1456b1909a2d10 (diff) | |
download | frameworks_base-ff3362f0d8378d616f39cbcf8b86b6f03e7d30b9.zip frameworks_base-ff3362f0d8378d616f39cbcf8b86b6f03e7d30b9.tar.gz frameworks_base-ff3362f0d8378d616f39cbcf8b86b6f03e7d30b9.tar.bz2 |
Merge "DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front."
Diffstat (limited to 'services')
-rwxr-xr-x[-rw-r--r--] | services/java/com/android/server/am/ActivityStackSupervisor.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java index 483b4a0..93de0a6 100644..100755 --- a/services/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/java/com/android/server/am/ActivityStackSupervisor.java @@ -1425,6 +1425,7 @@ public final class ActivityStackSupervisor { r.resultTo = null; } + boolean switchStackFromBg = false; boolean addingToTask = false; boolean movedHome = false; TaskRecord reuseTask = null; @@ -1486,6 +1487,11 @@ public final class ActivityStackSupervisor { } options = null; } + } else { + switchStackFromBg = lastStack != targetStack; + if (DEBUG_TASKS) Slog.d(TAG, "Caller " + sourceRecord + + " is not top task, it may not move " + r + + " to front, switchStack=" + switchStackFromBg); } // If the caller has requested that the target task be // reset, then do so. @@ -1593,6 +1599,10 @@ public final class ActivityStackSupervisor { // don't use that intent!) And for paranoia, make // sure we have correctly resumed the top activity. if (doResume) { + if (switchStackFromBg) { + moveHomeStack(lastStack.isHomeStack()); + targetStack = lastStack; + } targetStack.resumeTopActivityLocked(null, options); } else { ActivityOptions.abort(options); |