From ca23b981d9aa72b98ac3c5d53009a7e9477be6be Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 21 Sep 2020 11:47:40 -0700 Subject: [PATCH] Allow touches on Workspace during transition from Overview Previously we only allowed touches on the hotseat (due to it being in the shelf in Overview); now we allow touches anywhere if we are not in an overview state. Test: enter overview, swipe up to home and scroll workspace or tap a workspace icon during the transition Bug: 169052350 Change-Id: I59ee695ba9cb6f5fddd8e41c5796cdba6b3d2112 --- .../android/quickstep/views/LauncherRecentsView.java | 11 ++--------- src/com/android/launcher3/Workspace.java | 7 ------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java index b338bd07ee..52a7466429 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java @@ -36,7 +36,6 @@ import android.view.Surface; import android.widget.FrameLayout; import com.android.launcher3.BaseQuickstepLauncher; -import com.android.launcher3.Hotseat; import com.android.launcher3.LauncherState; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.statemanager.StateManager.StateListener; @@ -177,14 +176,8 @@ public class LauncherRecentsView extends RecentsView @Override protected boolean shouldStealTouchFromSiblingsBelow(MotionEvent ev) { - if (ev.getAction() == MotionEvent.ACTION_DOWN) { - // Allow touches to go through to the hotseat. - Hotseat hotseat = mActivity.getHotseat(); - boolean touchingHotseat = hotseat.isShown() - && mActivity.getDragLayer().isEventOverView(hotseat, ev, this); - return !touchingHotseat; - } - return super.shouldStealTouchFromSiblingsBelow(ev); + return mActivity.getStateManager().getState().overviewUi + && super.shouldStealTouchFromSiblingsBelow(ev); } @Override diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 45aaa1b673..e7ded363a2 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1175,13 +1175,6 @@ public class Workspace extends PagedView computeScrollHelper(false); } - @Override - protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) { - if (!isSwitchingState()) { - super.determineScrollingStart(ev, touchSlopScale); - } - } - @Override public void announceForAccessibility(CharSequence text) { // Don't announce if apps is on top of us.