Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3d6ae10 authored by Kazuki Takise's avatar Kazuki Takise Committed by Automerger Merge Worker
Browse files

Merge "Shift focus when a task with multiple activities gets removed" into...

Merge "Shift focus when a task with multiple activities gets removed" into tm-qpr-dev am: d012ff2d am: 4d5cfe52

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20290966



Change-Id: I62ad6ebb03ed56e31d7efa4ab22b9d36e79c5548
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 78b69a17 4d5cfe52
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1588,6 +1588,11 @@ class Task extends TaskFragment {
                removeChild(r, reason);
            });
        } 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();
            forAllActivities((r) -> {
                if (r.finishing || (excludingTaskOverlay && r.isTaskOverlay())) {
                    return;
@@ -1601,7 +1606,7 @@ class Task extends TaskFragment {
                } else {
                    r.destroyIfPossible(reason);
                }
            });
            }, traverseTopToBottom);
        }
    }