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

Commit a0ca1ebd authored by Tracy Zhou's avatar Tracy Zhou Committed by Automerger Merge Worker
Browse files

Merge "Fix subsequent tabbing in recents from alt tab not working" into...

Merge "Fix subsequent tabbing in recents from alt tab not working" into tm-qpr-dev am: 39d9eb81 am: de315c24

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19938037



Change-Id: Ib92a6b7b50dd55a3bf71c7c274f4c10607090ac0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fcb43caf de315c24
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -193,7 +193,20 @@ public class OverviewCommandHelper {
            }
        }

        if (activityInterface.switchToRecentsIfVisible(() -> scheduleNextTask(cmd))) {
        final Runnable completeCallback = () -> {
            if (cmd.type == TYPE_SHOW_NEXT_FOCUS) {
                RecentsView rv = activityInterface.getVisibleRecentsView();
                // When the overview is launched via alt tab (cmd type is TYPE_SHOW_NEXT_FOCUS),
                // the touch mode somehow is not change to false by the Android framework.
                // The subsequent tab to go through tasks in overview can only be dispatched to
                // focuses views, while focus can only be requested in
                // {@link View#requestFocusNoSearch(int, Rect)} when touch mode is false. To note,
                // here we launch overview from home.
                rv.getViewRootImpl().touchModeChanged(false);
            }
            scheduleNextTask(cmd);
        };
        if (activityInterface.switchToRecentsIfVisible(completeCallback)) {
            // If successfully switched, wait until animation finishes
            return false;
        }
@@ -268,6 +281,13 @@ public class OverviewCommandHelper {
            RecentsView rv =
                    mOverviewComponentObserver.getActivityInterface().getVisibleRecentsView();
            if (rv != null) {
                // When the overview is launched via alt tab (cmd type is TYPE_SHOW_NEXT_FOCUS),
                // the touch mode somehow is not change to false by the Android framework.
                // The subsequent tab to go through tasks in overview can only be dispatched to
                // focuses views, while focus can only be requested in
                // {@link View#requestFocusNoSearch(int, Rect)} when touch mode is false. To note,
                // here we launch overview with live tile.
                rv.getViewRootImpl().touchModeChanged(false);
                // Ensure that recents view has focus so that it receives the followup key inputs
                TaskView taskView = rv.getNextTaskView();
                if (taskView == null) {