Support 3-finger swipe to pull down notifications from app

Fixes: 270211015
Test: 3-finger swipe down to bring down notifications. 3-finger swipe up to go home / to Overview

Change-Id: Id0f8ad95d9a4a1f8ecf1632ea28efb0c790c291b
This commit is contained in:
Tracy Zhou committed 2023-04-19 23:37:37 -07:00
1 parent 47f2dd6a11
commit 75b534e9c9
3 files changed
+10 -8

No files matched your search

@@ -294,8 +294,14 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
boolean haveNotPassedSlopOnContinuedGesture =
!mPassedSlopOnThisGesture && mPassedPilferInputSlop;
double degrees = Math.toDegrees(Math.atan(upDist / horizontalDist));
boolean isLikelyToStartNewTask = haveNotPassedSlopOnContinuedGesture
|| degrees <= OVERVIEW_MIN_DEGREES;
// Regarding degrees >= -OVERVIEW_MIN_DEGREES - Trackpad gestures can start anywhere
// on the screen, allowing downward swipes. We want to impose the same angle in that
// scenario.
boolean swipeWithinQuickSwitchRange = degrees <= OVERVIEW_MIN_DEGREES
&& (!mGestureState.isTrackpadGesture() || degrees >= -OVERVIEW_MIN_DEGREES);
boolean isLikelyToStartNewTask =
haveNotPassedSlopOnContinuedGesture || swipeWithinQuickSwitchRange;
if (!mPassedPilferInputSlop) {
if (passedSlop) {