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

Commit b554fec8 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Clear preferred focusable task when finishing an activity." into main

parents 2a7a09dc 8e01ec8c
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3625,6 +3625,13 @@ final class ActivityRecord extends WindowToken {
            if (chain.isCollecting()) {
                chain.getTransition().collectClose(trigger);
            }

            if (Flags.polishCloseWallpaperIncludesOpenChange() && endTask) {
                final TaskDisplayArea displayArea = getDisplayArea();
                if (displayArea != null && rootTask == displayArea.mPreferredTopFocusableRootTask) {
                    displayArea.clearPreferredTopFocusableRootTask();
                }
            }
            // We are finishing the top focused activity and its task has nothing to be focused so
            // the next focusable task should be focused.
            if (mayAdjustTop && task.topRunningActivity(true /* focusableOnly */)