Merge "Decrease overview degree threshold from 45 to 15 degrees." into tm-dev am: 7bd3e02e2f am: f764ccea03

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17838566

Change-Id: I1d1570f4bcf39b564a8d8e80e0454a70f16863e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Brian Isganitis authored and Automerger Merge Worker committed 2022-04-20 18:39:54 +00:00
commit 0d727db44d
2 files changed
+15 -5

No files matched your search

@@ -88,6 +88,9 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
public static final float QUICKSTEP_TOUCH_SLOP_RATIO_TWO_BUTTON = 9;
public static final float QUICKSTEP_TOUCH_SLOP_RATIO_GESTURAL = 2;
// Minimum angle of a gesture's coordinate where a release goes to overview.
public static final int OVERVIEW_MIN_DEGREES = 15;
private final RecentsAnimationDeviceState mDeviceState;
private final NavBarPosition mNavBarPosition;
private final TaskAnimationManager mTaskAnimationManager;
@@ -296,8 +299,9 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
// the gesture (in which case mPassedPilferInputSlop starts as true).
boolean haveNotPassedSlopOnContinuedGesture =
!mPassedSlopOnThisGesture && mPassedPilferInputSlop;
double degrees = Math.toDegrees(Math.atan(upDist / horizontalDist));
boolean isLikelyToStartNewTask = haveNotPassedSlopOnContinuedGesture
|| horizontalDist > upDist;
|| degrees <= OVERVIEW_MIN_DEGREES;
if (!mPassedPilferInputSlop) {
if (passedSlop) {