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

Commit 43461330 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Clear the preferred top focusable root task when moving" into tm-qpr-dev am: 07acd8a9

parents 109ceb83 07acd8a9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -422,8 +422,10 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
        // wasContained} restricts the preferred root task is set only when moving an existing
        // root task to top instead of adding a new root task that may be too early (e.g. in the
        // middle of launching or reparenting).
        if (moveToTop && child.isFocusableAndVisible()) {
            mPreferredTopFocusableRootTask = child;
        final boolean isTopFocusableTask = moveToTop && child.isTopActivityFocusable();
        if (isTopFocusableTask) {
            mPreferredTopFocusableRootTask =
                    child.shouldBeVisible(null /* starting */) ? child : null;
        } else if (mPreferredTopFocusableRootTask == child) {
            mPreferredTopFocusableRootTask = null;
        }