From 2450adf56ff559a06699d32052f9ff50b863b4ca Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Wed, 21 Jul 2021 14:52:01 +0100 Subject: [PATCH] Always use INSIDE_TO_OUTSIDE scope when swiping to home in tablets - In tablets user is either in home screen or there is a taskbar on screen, so swipe to home will always touches the launcher Bug: 193653850 Test: StartLauncherViaGestureTests Change-Id: Id1b05708324302eb4b4c2d623ca9fe27090188fc --- .../quickstep/TouchInteractionService.java | 13 ------ .../StartLauncherViaGestureTests.java | 40 ++----------------- .../tapl/LauncherInstrumentation.java | 2 +- 3 files changed, 4 insertions(+), 51 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 7bb0b94119..b038c7b88c 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -67,7 +67,6 @@ import androidx.annotation.BinderThread; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; -import androidx.annotation.VisibleForTesting; import androidx.annotation.WorkerThread; import com.android.launcher3.BaseDraggingActivity; @@ -302,7 +301,6 @@ public class TouchInteractionService extends Service implements PluginListener { - TaskbarManager taskbarManager = - TouchInteractionService.getTaskbarManagerForTesting(); - if (taskbarManager == null) { - return false; - } - - TaskbarActivityContext taskbarActivityContext = - taskbarManager.getCurrentActivityContext(); - if (taskbarActivityContext == null) { - return false; - } - - TaskbarDragLayer taskbarDragLayer = taskbarActivityContext.getDragLayer(); - return TestViewHelpers.findChildView(taskbarDragLayer, - view -> view instanceof TaskbarView && view.isVisibleToUser()) != null; - }, DEFAULT_UI_TIMEOUT); - } } diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 7f9f1b6a35..1f64131703 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -749,7 +749,7 @@ public final class LauncherInstrumentation { displaySize.x / 2, displaySize.y - 1, displaySize.x / 2, 0, ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME, NORMAL_STATE_ORDINAL, - launcherWasVisible + launcherWasVisible || isTablet() ? GestureScope.INSIDE_TO_OUTSIDE : GestureScope.OUTSIDE_WITH_PILFER); }