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

Commit 07acd8a9 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

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

parents e7f01c35 efad747e
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;
        }