diff options
| author | 2022-11-24 07:33:29 +0000 | |
|---|---|---|
| committer | 2022-11-24 07:33:29 +0000 | |
| commit | 5cb30904c8a08e5e6a05927dd46b7394ca5f618e (patch) | |
| tree | 9b1786813ad4966777b337600a1e3ea08726b49b | |
| parent | 5bb5cd952abf8e8501b92223a9d6fdfb6a1624aa (diff) | |
| parent | 47f63c00104390559e6303178500b9143babebed (diff) | |
Merge "Finishes activities in the reverse order"
| -rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 4e7fe0e71420..356cbdacbed6 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -1587,9 +1587,9 @@ class Task extends TaskFragment {          } else {              // Finish or destroy apps from the bottom to ensure that all the other activity have              // been finished and the top task in another task gets resumed when a top activity is -            // removed. Otherwise, shell transitions wouldn't run because there would be no event -            // that sets the transition ready. -            final boolean traverseTopToBottom = !mTransitionController.isShellTransitionsEnabled(); +            // removed. Otherwise, the next top activity could be started while the top activity +            // is removed, which is not necessary since the next top activity is on the same Task +            // and should also be removed.              forAllActivities((r) -> {                  if (r.finishing || (excludingTaskOverlay && r.isTaskOverlay())) {                      return; @@ -1603,7 +1603,7 @@ class Task extends TaskFragment {                  } else {                      r.destroyIfPossible(reason);                  } -            }, traverseTopToBottom); +            }, false /* traverseTopToBottom */);          }      }  |