Loading quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +3 −5 Original line number Diff line number Diff line Loading @@ -81,8 +81,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test public void testAllAppsFromOverview() throws Exception { // When actions are enabled, all apps isn't present in overview if (mLauncher.overviewActionsEnabled()) { if (!mLauncher.hasAllAppsInOverview()) { return; } Loading Loading @@ -146,7 +145,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { launcher -> assertEquals("Dismissing a task didn't remove 1 task from Overview", numTasks - 1, getTaskCount(launcher))); if (!mLauncher.overviewActionsEnabled() && (!TestHelpers.isInLauncherProcess() if (mLauncher.hasAllAppsInOverview() && (!TestHelpers.isInLauncherProcess() || getFromLauncher(launcher -> !launcher.getDeviceProfile().isLandscape))) { // Test switching to all apps and back. final AllAppsFromOverview allApps = overview.switchToAllApps(); Loading Loading @@ -190,8 +189,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test public void testAppIconLaunchFromAllAppsFromOverview() throws Exception { // All apps doesn't exist in Overview when actions are enabled if (mLauncher.overviewActionsEnabled()) { if (!mLauncher.hasAllAppsInOverview()) { return; } Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +19 −2 Original line number Diff line number Diff line Loading @@ -567,7 +567,7 @@ public final class LauncherInstrumentation { return waitForLauncherObject(APPS_RES_ID); } case OVERVIEW: { if (mDevice.isNaturalOrientation() && !overviewActionsEnabled()) { if (hasAllAppsInOverview()) { waitForLauncherObject(APPS_RES_ID); } else { waitUntilGone(APPS_RES_ID); Loading Loading @@ -1227,7 +1227,24 @@ public final class LauncherInstrumentation { getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); } public boolean overviewActionsEnabled() { public boolean hasAllAppsInOverview() { // Vertical bar layouts don't contain all apps if (!mDevice.isNaturalOrientation()) { return false; } // Portrait two button (quickstep) always has all apps. if (getNavigationModel() == NavigationModel.TWO_BUTTON) { return true; } // Overview actions hide all apps if (overviewActionsEnabled()) { return false; } // ...otherwise there should be all apps return true; } private boolean overviewActionsEnabled() { return getTestInfo(TestProtocol.REQUEST_OVERVIEW_ACTIONS_ENABLED).getBoolean( TestProtocol.TEST_INFO_RESPONSE_FIELD); } Loading Loading
quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +3 −5 Original line number Diff line number Diff line Loading @@ -81,8 +81,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test public void testAllAppsFromOverview() throws Exception { // When actions are enabled, all apps isn't present in overview if (mLauncher.overviewActionsEnabled()) { if (!mLauncher.hasAllAppsInOverview()) { return; } Loading Loading @@ -146,7 +145,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { launcher -> assertEquals("Dismissing a task didn't remove 1 task from Overview", numTasks - 1, getTaskCount(launcher))); if (!mLauncher.overviewActionsEnabled() && (!TestHelpers.isInLauncherProcess() if (mLauncher.hasAllAppsInOverview() && (!TestHelpers.isInLauncherProcess() || getFromLauncher(launcher -> !launcher.getDeviceProfile().isLandscape))) { // Test switching to all apps and back. final AllAppsFromOverview allApps = overview.switchToAllApps(); Loading Loading @@ -190,8 +189,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test public void testAppIconLaunchFromAllAppsFromOverview() throws Exception { // All apps doesn't exist in Overview when actions are enabled if (mLauncher.overviewActionsEnabled()) { if (!mLauncher.hasAllAppsInOverview()) { return; } Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +19 −2 Original line number Diff line number Diff line Loading @@ -567,7 +567,7 @@ public final class LauncherInstrumentation { return waitForLauncherObject(APPS_RES_ID); } case OVERVIEW: { if (mDevice.isNaturalOrientation() && !overviewActionsEnabled()) { if (hasAllAppsInOverview()) { waitForLauncherObject(APPS_RES_ID); } else { waitUntilGone(APPS_RES_ID); Loading Loading @@ -1227,7 +1227,24 @@ public final class LauncherInstrumentation { getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); } public boolean overviewActionsEnabled() { public boolean hasAllAppsInOverview() { // Vertical bar layouts don't contain all apps if (!mDevice.isNaturalOrientation()) { return false; } // Portrait two button (quickstep) always has all apps. if (getNavigationModel() == NavigationModel.TWO_BUTTON) { return true; } // Overview actions hide all apps if (overviewActionsEnabled()) { return false; } // ...otherwise there should be all apps return true; } private boolean overviewActionsEnabled() { return getTestInfo(TestProtocol.REQUEST_OVERVIEW_ACTIONS_ENABLED).getBoolean( TestProtocol.TEST_INFO_RESPONSE_FIELD); } Loading