From 2bb92ba49d254f31517d91e536c88307309ab61c Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Fri, 13 Aug 2021 00:41:31 -0700 Subject: [PATCH] Update LauncherInstrumentation to consider tablet w/o nav bar Bug: 191660313 Test: TaplTestsLauncher3 Change-Id: I7bbcc2f9c3eb7b62dc2abd94b63df22b7168bf15 --- .../launcher3/tapl/LauncherInstrumentation.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 8b9ae6964c..6112631eea 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -622,9 +622,7 @@ public final class LauncherInstrumentation { } private String getNavigationButtonResPackage() { - return isTablet() && getNavigationModel() == NavigationModel.THREE_BUTTON ? - getLauncherPackageName() : - SYSTEMUI_PACKAGE; + return isTablet() ? getLauncherPackageName() : SYSTEMUI_PACKAGE; } private UiObject2 verifyContainerType(ContainerType containerType) { @@ -755,11 +753,11 @@ public final class LauncherInstrumentation { boolean gestureStartFromLauncher = isTablet() ? !isLauncher3() || hasLauncherObject(WORKSPACE_RES_ID) : isLauncherVisible(); - GestureScope gestureScope = gestureStartFromLauncher - ? GestureScope.INSIDE_TO_OUTSIDE - : GestureScope.OUTSIDE_WITH_PILFER; if (hasLauncherObject(CONTEXT_MENU_RES_ID)) { + GestureScope gestureScope = gestureStartFromLauncher + ? (isTablet()? GestureScope.INSIDE : GestureScope.INSIDE_TO_OUTSIDE) + : GestureScope.OUTSIDE_WITH_PILFER; linearGesture( displaySize.x / 2, displaySize.y - 1, displaySize.x / 2, 0, @@ -785,7 +783,8 @@ public final class LauncherInstrumentation { displaySize.x / 2, displaySize.y - 1, displaySize.x / 2, 0, ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME, NORMAL_STATE_ORDINAL, - gestureScope); + gestureStartFromLauncher ? GestureScope.INSIDE_TO_OUTSIDE + : GestureScope.OUTSIDE_WITH_PILFER); } } else { log("Hierarchy before clicking home:");