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

Commit dd9289ae authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clear preferred top focusable root task" into sc-dev am: ba19c63b am: 81a44019

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

Change-Id: I6fe2051bde1d72c2c4aa4141ea38d6c8dccf995c
parents 4c2a6ae7 81a44019
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3071,6 +3071,11 @@ class Task extends WindowContainer<WindowContainer> {
            focusableTask = mRootWindowContainer.getNextFocusableRootTask(this, !allowFocusSelf);
        }
        if (focusableTask == null) {
            final TaskDisplayArea taskDisplayArea = getDisplayArea();
            if (taskDisplayArea != null) {
                // Clear the recorded task since there is no next focusable task.
                taskDisplayArea.clearPreferredTopFocusableRootTask();
            }
            return null;
        }

+5 −0
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
     * unable to resume target root task properly when there are other focusable always-on-top
     * root tasks.
     */
    @VisibleForTesting
    Task mPreferredTopFocusableRootTask;

    /**
@@ -2130,6 +2131,10 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
                && mDisplayContent.getOrientationRequestingTaskDisplayArea() == this;
    }

    void clearPreferredTopFocusableRootTask() {
        mPreferredTopFocusableRootTask = null;
    }

    @Override
    boolean isTaskDisplayArea() {
        return true;