diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java index f15d12b12d..8566e20e14 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java @@ -193,10 +193,14 @@ public final class KeyboardQuickSwitchController implements } void closeQuickSwitchView() { + closeQuickSwitchView(true); + } + + void closeQuickSwitchView(boolean animate) { if (mQuickSwitchViewController == null) { return; } - mQuickSwitchViewController.closeQuickSwitchView(true); + mQuickSwitchViewController.closeQuickSwitchView(animate); } /** diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index 27a895c3d4..003b27f2d6 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -1553,4 +1553,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public float getStashedTaskbarScale() { return mControllers.stashedHandleViewController.getStashedHandleHintScale().value; } + + /** Closes the KeyboardQuickSwitchView without an animation if open. */ + public void closeKeyboardQuickSwitchView() { + mControllers.keyboardQuickSwitchController.closeQuickSwitchView(false); + } } diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index 65b5397fd1..56c9a00016 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -248,7 +248,15 @@ public class OverviewCommandHelper { case TYPE_SHOW: // already visible return true; + case TYPE_KEYBOARD_INPUT: { + if (visibleRecentsView.isHandlingTouch()) { + return true; + } + } case TYPE_HIDE: { + if (visibleRecentsView.isHandlingTouch()) { + return true; + } mKeyboardTaskFocusIndex = INVALID_PAGE; int currentPage = visibleRecentsView.getNextPage(); TaskView tv = (currentPage >= 0 diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 415f73f1aa..9e25923e16 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -753,6 +753,10 @@ public class TouchInteractionService extends Service { boolean isOneHandedModeActive = mDeviceState.isOneHandedModeActive(); boolean isInSwipeUpTouchRegion = mRotationTouchHelper.isInSwipeUpTouchRegion(event); + TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext(); + if (isInSwipeUpTouchRegion && tac != null) { + tac.closeKeyboardQuickSwitchView(); + } if ((!isOneHandedModeActive && isInSwipeUpTouchRegion) || isHoverActionWithoutConsumer) { reasonString.append(!isOneHandedModeActive && isInSwipeUpTouchRegion diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 2cbeb31fbd..738d3e7ff2 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4224,30 +4224,31 @@ public abstract class RecentsView