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

Commit 2e75d1bb authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Adjust to next focusable task if top task is died" into main

parents ae878a61 98d05066
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6420,6 +6420,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                if (!restarting && hasVisibleActivities) {
                    deferWindowLayout();
                    try {
                        final Task topTask = mRootWindowContainer.getTopDisplayFocusedRootTask();
                        if (topTask != null
                                && topTask.topRunningActivity(true /* focusableOnly */) == null) {
                            topTask.adjustFocusToNextFocusableTask("handleAppDied");
                        }
                        if (!mRootWindowContainer.resumeFocusedTasksTopActivities()) {
                            // If there was nothing to resume, and we are not already restarting
                            // this process, but there is a visible activity that is hosted by the