mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Focus a task by default when using keyboard to go to overview.
Fix: 322898816 Test: TaplTestsQuickstep.java Flag: None. Change-Id: I6d4b0ca6593ed2ac7c7d8793954c36e55b5978de
This commit is contained in:
@@ -44,6 +44,7 @@ import com.android.launcher3.tapl.Overview;
|
||||
import com.android.launcher3.tapl.OverviewActions;
|
||||
import com.android.launcher3.tapl.OverviewTask;
|
||||
import com.android.launcher3.tapl.SelectModeButtons;
|
||||
import com.android.launcher3.tapl.Workspace;
|
||||
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
|
||||
import com.android.launcher3.util.Wait;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
|
||||
@@ -227,6 +228,32 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
|
||||
isInState(() -> LauncherState.NORMAL));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenOverviewWithActionPlusTabKeys() throws Exception {
|
||||
startTestAppsWithCheck();
|
||||
startAppFast(CALCULATOR_APP_PACKAGE); // Ensure Calculator is last opened app.
|
||||
Workspace home = mLauncher.goHome();
|
||||
assertTrue("Launcher state is not Home", isInState(() -> LauncherState.NORMAL));
|
||||
|
||||
Overview overview = home.openOverviewFromActionPlusTabKeyboardShortcut();
|
||||
|
||||
assertTrue("Launcher state is not Overview", isInState(() -> LauncherState.OVERVIEW));
|
||||
overview.launchFocusedTaskByEnterKey(CALCULATOR_APP_PACKAGE); // Assert app is focused.
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenOverviewWithRecentsKey() throws Exception {
|
||||
startTestAppsWithCheck();
|
||||
startAppFast(CALCULATOR_APP_PACKAGE); // Ensure Calculator is last opened app.
|
||||
Workspace home = mLauncher.goHome();
|
||||
assertTrue("Launcher state is not Home", isInState(() -> LauncherState.NORMAL));
|
||||
|
||||
Overview overview = home.openOverviewFromRecentsKeyboardShortcut();
|
||||
|
||||
assertTrue("Launcher state is not Overview", isInState(() -> LauncherState.OVERVIEW));
|
||||
overview.launchFocusedTaskByEnterKey(CALCULATOR_APP_PACKAGE); // Assert app is focused.
|
||||
}
|
||||
|
||||
private int getCurrentOverviewPage(Launcher launcher) {
|
||||
return launcher.<RecentsView>getOverviewPanel().getCurrentPage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user