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

Commit d955d230 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix KQS first task focux when there is only one recent task" into main

parents f01687ab 3b6e45d0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -362,8 +362,9 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
                                        OPEN_OUTLINE_INTERPOLATOR));
                    }
                });
                animateFocusMove(-1, currentFocusIndexOverride == -1
                        ? Math.min(mContent.getChildCount(), 1) : currentFocusIndexOverride);
                animateFocusMove(-1, Math.min(
                        mContent.getChildCount() - 1,
                        currentFocusIndexOverride == -1 ? 1 : currentFocusIndexOverride));
                displayedContent.setVisibility(VISIBLE);
                setVisibility(VISIBLE);
                requestFocus();
+7 −0
Original line number Diff line number Diff line
@@ -149,6 +149,13 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
        runTest(TestSurface.WIDGETS, TestCase.LAUNCH_OVERVIEW);
    }

    @Test
    public void testLaunchSingleRecentTask() {
        mLauncher.getLaunchedAppState().switchToOverview().dismissAllTasks();
        startAppFast(CALCULATOR_APP_PACKAGE);
        mLauncher.goHome().showQuickSwitchView().launchFocusedAppTask(CALCULATOR_APP_PACKAGE);
    }

    private void runTest(@NonNull TestSurface testSurface, @NonNull TestCase testCase) {
        for (int i = 0; i < testCase.mNumAdditionalRunningTasks; i++) {
            startTestActivity(3 + i);