Loading quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -106,10 +106,10 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { }); return response; case TestProtocol.REQUEST_TASKBAR_FROM_NAV_THRESHOLD: { case TestProtocol.REQUEST_STASHED_TASKBAR_HEIGHT: { final Resources resources = mContext.getResources(); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, resources.getDimensionPixelSize(R.dimen.taskbar_from_nav_threshold)); resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size)); return response; } Loading quickstep/tests/src/com/android/quickstep/TaplTestsPersistentTaskbar.java +13 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,9 @@ import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch; import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -33,10 +32,17 @@ public class TaplTestsPersistentTaskbar extends AbstractTaplTestsTaskbar { @Test @TaskbarModeSwitch(mode = PERSISTENT) @PortraitLandscape @NavigationModeSwitch public void testTaskbarFillsWidth() { // Width check is performed inside TAPL whenever getTaskbar() is called. getTaskbar(); public void testHideShowTaskbar() { getTaskbar().hide(); mLauncher.getLaunchedAppState().showTaskbar(); } @Test @TaskbarModeSwitch(mode = PERSISTENT) @Ignore // b/301575789 public void testHideTaskbarPersistsOnRecreate() { getTaskbar().hide(); mLauncher.recreateTaskbar(); mLauncher.getLaunchedAppState().assertTaskbarHidden(); } } quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +25 −50 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.quickstep; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.TRANSIENT; import static org.junit.Assert.assertEquals; Loading Loading @@ -294,7 +295,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { } @Test @TaskbarModeSwitch @TaskbarModeSwitch(mode = PERSISTENT) public void testQuickSwitchToPreviousAppForTablet() throws Exception { assumeTrue(mLauncher.isTablet()); startTestActivity(2); Loading @@ -303,12 +304,9 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { // Set ignoreTaskbarVisibility to true to verify the task bar visibility explicitly. mLauncher.setIgnoreTaskbarVisibility(true); try { boolean isTransientTaskbar = mLauncher.isTransientTaskbar(); // Expect task bar invisible when the launched app was the IME activity. LaunchedAppState launchedAppState = getAndAssertLaunchedApp(); if (!isTransientTaskbar && isHardwareKeyboard()) { if (isHardwareKeyboard()) { launchedAppState.assertTaskbarVisible(); } else { launchedAppState.assertTaskbarHidden(); Loading @@ -319,18 +317,10 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { assertTestActivityIsRunning(2, "The first app we should have quick switched to is not running"); launchedAppState = getAndAssertLaunchedApp(); if (isTransientTaskbar) { launchedAppState.assertTaskbarHidden(); } else { // Expect task bar visible when the launched app was the test activity. launchedAppState = getAndAssertLaunchedApp(); launchedAppState.assertTaskbarVisible(); } } finally { // Reset ignoreTaskbarVisibility to ensure other tests still verify it. mLauncher.setIgnoreTaskbarVisibility(false); } } private boolean isHardwareKeyboard() { return Configuration.KEYBOARD_QWERTY Loading Loading @@ -368,7 +358,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch() @TaskbarModeSwitch(mode = PERSISTENT) @PlatinumTest(focusArea = "launcher") @TestStabilityRule.Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/309820115 @ScreenRecord // b/309820115 Loading Loading @@ -464,7 +454,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch public void testTaskbarDeadzonesForTablet() throws Exception { assumeTrue(mLauncher.isTablet()); Loading @@ -477,19 +466,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { launcher -> assertTrue("Should have at least 3 tasks", getTaskCount(launcher) >= 3)); if (mLauncher.isTransientTaskbar()) { // On transient taskbar, it should dismiss when tapping outside taskbar bounds. overview.touchTaskbarBottomCorner(/* tapRight= */ false); assertTrue("Launcher internal state should be Normal", isInState(() -> LauncherState.NORMAL)); overview = mLauncher.getWorkspace().switchToOverview(); // On transient taskbar, it should dismiss when tapping outside taskbar bounds. overview.touchTaskbarBottomCorner(/* tapRight= */ true); assertTrue("Launcher internal state should be Normal", isInState(() -> LauncherState.NORMAL)); } else { // On persistent taskbar, it should not dismiss when tapping the taskbar overview.touchTaskbarBottomCorner(/* tapRight= */ false); assertTrue("Launcher internal state should be Overview", Loading @@ -500,7 +476,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { assertTrue("Launcher internal state should be Overview", isInState(() -> LauncherState.OVERVIEW)); } } @Test public void testDisableRotationCheckForPhone() throws Exception { Loading quickstep/tests/src/com/android/quickstep/TaplTestsTransientTaskbar.java +0 −9 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static org.junit.Assume.assumeTrue; import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch; import org.junit.Test; Loading Loading @@ -65,12 +64,4 @@ public class TaplTestsTransientTaskbar extends AbstractTaplTestsTaskbar { getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE); mLauncher.getLaunchedAppState().clickStashedTaskbarToGoHome(); } @Test @TaskbarModeSwitch(mode = TRANSIENT) @PortraitLandscape public void testSwipeToStashAndUnstash() { getTaskbar().swipeDownToStash(); mLauncher.getLaunchedAppState().swipeUpToUnstashTaskbar(); } } src/com/android/launcher3/testing/TestInformationHandler.java +0 −6 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.testing.shared.HotseatCellCenterRequest; import com.android.launcher3.testing.shared.TestProtocol; import com.android.launcher3.testing.shared.WorkspaceCellCenterRequest; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.ResourceBasedOverride; import com.android.launcher3.widget.picker.WidgetsFullSheet; Loading Loading @@ -180,11 +179,6 @@ public class TestInformationHandler implements ResourceBasedOverride { mDeviceProfile.numShownAllAppsColumns); return response; case TestProtocol.REQUEST_IS_TRANSIENT_TASKBAR: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, DisplayController.isTransientTaskbar(mContext)); return response; case TestProtocol.REQUEST_IS_TWO_PANELS: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, FOLDABLE_SINGLE_PAGE.get() ? false : mDeviceProfile.isTwoPanels); Loading Loading
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -106,10 +106,10 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { }); return response; case TestProtocol.REQUEST_TASKBAR_FROM_NAV_THRESHOLD: { case TestProtocol.REQUEST_STASHED_TASKBAR_HEIGHT: { final Resources resources = mContext.getResources(); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, resources.getDimensionPixelSize(R.dimen.taskbar_from_nav_threshold)); resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size)); return response; } Loading
quickstep/tests/src/com/android/quickstep/TaplTestsPersistentTaskbar.java +13 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,9 @@ import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch; import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; Loading @@ -33,10 +32,17 @@ public class TaplTestsPersistentTaskbar extends AbstractTaplTestsTaskbar { @Test @TaskbarModeSwitch(mode = PERSISTENT) @PortraitLandscape @NavigationModeSwitch public void testTaskbarFillsWidth() { // Width check is performed inside TAPL whenever getTaskbar() is called. getTaskbar(); public void testHideShowTaskbar() { getTaskbar().hide(); mLauncher.getLaunchedAppState().showTaskbar(); } @Test @TaskbarModeSwitch(mode = PERSISTENT) @Ignore // b/301575789 public void testHideTaskbarPersistsOnRecreate() { getTaskbar().hide(); mLauncher.recreateTaskbar(); mLauncher.getLaunchedAppState().assertTaskbarHidden(); } }
quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +25 −50 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.quickstep; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.TRANSIENT; import static org.junit.Assert.assertEquals; Loading Loading @@ -294,7 +295,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { } @Test @TaskbarModeSwitch @TaskbarModeSwitch(mode = PERSISTENT) public void testQuickSwitchToPreviousAppForTablet() throws Exception { assumeTrue(mLauncher.isTablet()); startTestActivity(2); Loading @@ -303,12 +304,9 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { // Set ignoreTaskbarVisibility to true to verify the task bar visibility explicitly. mLauncher.setIgnoreTaskbarVisibility(true); try { boolean isTransientTaskbar = mLauncher.isTransientTaskbar(); // Expect task bar invisible when the launched app was the IME activity. LaunchedAppState launchedAppState = getAndAssertLaunchedApp(); if (!isTransientTaskbar && isHardwareKeyboard()) { if (isHardwareKeyboard()) { launchedAppState.assertTaskbarVisible(); } else { launchedAppState.assertTaskbarHidden(); Loading @@ -319,18 +317,10 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { assertTestActivityIsRunning(2, "The first app we should have quick switched to is not running"); launchedAppState = getAndAssertLaunchedApp(); if (isTransientTaskbar) { launchedAppState.assertTaskbarHidden(); } else { // Expect task bar visible when the launched app was the test activity. launchedAppState = getAndAssertLaunchedApp(); launchedAppState.assertTaskbarVisible(); } } finally { // Reset ignoreTaskbarVisibility to ensure other tests still verify it. mLauncher.setIgnoreTaskbarVisibility(false); } } private boolean isHardwareKeyboard() { return Configuration.KEYBOARD_QWERTY Loading Loading @@ -368,7 +358,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch() @TaskbarModeSwitch(mode = PERSISTENT) @PlatinumTest(focusArea = "launcher") @TestStabilityRule.Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/309820115 @ScreenRecord // b/309820115 Loading Loading @@ -464,7 +454,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape @TaskbarModeSwitch public void testTaskbarDeadzonesForTablet() throws Exception { assumeTrue(mLauncher.isTablet()); Loading @@ -477,19 +466,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { launcher -> assertTrue("Should have at least 3 tasks", getTaskCount(launcher) >= 3)); if (mLauncher.isTransientTaskbar()) { // On transient taskbar, it should dismiss when tapping outside taskbar bounds. overview.touchTaskbarBottomCorner(/* tapRight= */ false); assertTrue("Launcher internal state should be Normal", isInState(() -> LauncherState.NORMAL)); overview = mLauncher.getWorkspace().switchToOverview(); // On transient taskbar, it should dismiss when tapping outside taskbar bounds. overview.touchTaskbarBottomCorner(/* tapRight= */ true); assertTrue("Launcher internal state should be Normal", isInState(() -> LauncherState.NORMAL)); } else { // On persistent taskbar, it should not dismiss when tapping the taskbar overview.touchTaskbarBottomCorner(/* tapRight= */ false); assertTrue("Launcher internal state should be Overview", Loading @@ -500,7 +476,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { assertTrue("Launcher internal state should be Overview", isInState(() -> LauncherState.OVERVIEW)); } } @Test public void testDisableRotationCheckForPhone() throws Exception { Loading
quickstep/tests/src/com/android/quickstep/TaplTestsTransientTaskbar.java +0 −9 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static org.junit.Assume.assumeTrue; import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch; import org.junit.Test; Loading Loading @@ -65,12 +64,4 @@ public class TaplTestsTransientTaskbar extends AbstractTaplTestsTaskbar { getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE); mLauncher.getLaunchedAppState().clickStashedTaskbarToGoHome(); } @Test @TaskbarModeSwitch(mode = TRANSIENT) @PortraitLandscape public void testSwipeToStashAndUnstash() { getTaskbar().swipeDownToStash(); mLauncher.getLaunchedAppState().swipeUpToUnstashTaskbar(); } }
src/com/android/launcher3/testing/TestInformationHandler.java +0 −6 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.testing.shared.HotseatCellCenterRequest; import com.android.launcher3.testing.shared.TestProtocol; import com.android.launcher3.testing.shared.WorkspaceCellCenterRequest; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.ResourceBasedOverride; import com.android.launcher3.widget.picker.WidgetsFullSheet; Loading Loading @@ -180,11 +179,6 @@ public class TestInformationHandler implements ResourceBasedOverride { mDeviceProfile.numShownAllAppsColumns); return response; case TestProtocol.REQUEST_IS_TRANSIENT_TASKBAR: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, DisplayController.isTransientTaskbar(mContext)); return response; case TestProtocol.REQUEST_IS_TWO_PANELS: response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, FOLDABLE_SINGLE_PAGE.get() ? false : mDeviceProfile.isTwoPanels); Loading