From c5985751c433c26f87d2023766a4e164222ddd91 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sun, 8 Jan 2023 00:29:37 -0800 Subject: [PATCH] Swipe-up from the bar area on the home screen should pull up overview Bug: 254783214 Test: swipe-up from the bar takes the user to overview; swipe-up from everywhere else on the home screen takes the user to all-apps Change-Id: Ic244c580d6828261c0369cb5c812a9eb8cbec7fe --- .../android/quickstep/RotationTouchHelper.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java index aab5703ae9..f75924b2c7 100644 --- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java +++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java @@ -233,10 +233,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { * @return whether the coordinates of the {@param event} is in the swipe up gesture region. */ public boolean isInSwipeUpTouchRegion(MotionEvent event, BaseActivityInterface activity) { + boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(), + event.getY()); + if (inBarArea) { + return true; + } if (isTrackpadMotionEvent(event)) { return !activity.isResumed(); } - return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(), event.getY()); + return false; } /** @@ -245,11 +250,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { */ public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex, BaseActivityInterface activity) { + boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions( + event.getX(pointerIndex), event.getY(pointerIndex)); + if (inBarArea) { + return true; + } if (isTrackpadMotionEvent(event)) { return !activity.isResumed(); } - return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(pointerIndex), - event.getY(pointerIndex)); + return false; } @Override