mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Check horizontal touch slop for non-vertical flings" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
9b775dfdac
@@ -364,7 +364,7 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
float xVelocityPxPerMs = isQuickSwitch ? 100 : 0;
|
||||
float yVelocityPxPerMs = isQuickSwitch ? 0 : -100;
|
||||
swipeHandler.onGestureEnded(
|
||||
yVelocityPxPerMs, new PointF(xVelocityPxPerMs, yVelocityPxPerMs));
|
||||
yVelocityPxPerMs, new PointF(xVelocityPxPerMs, yVelocityPxPerMs), isQuickSwitch);
|
||||
swipeHandler.onCalculateEndTarget();
|
||||
runOnMainSync(swipeHandler::onSettledOnEndTarget);
|
||||
|
||||
|
||||
@@ -116,14 +116,14 @@ class LauncherSwipeHandlerV2Test {
|
||||
@Test
|
||||
fun goHomeFromAppByTrackpad_updateEduStats() {
|
||||
gestureState.setTrackpadGestureType(GestureState.TrackpadGestureType.THREE_FINGER)
|
||||
underTest.onGestureEnded(flingSpeed, PointF())
|
||||
underTest.onGestureEnded(flingSpeed, PointF(), /* horizontalTouchSlopPassed= */ false)
|
||||
verify(systemUiProxy)
|
||||
.updateContextualEduStats(/* isTrackpadGesture= */ eq(true), eq(GestureType.HOME))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun goHomeFromAppByTouch_updateEduStats() {
|
||||
underTest.onGestureEnded(flingSpeed, PointF())
|
||||
underTest.onGestureEnded(flingSpeed, PointF(), /* horizontalTouchSlopPassed= */ false)
|
||||
verify(systemUiProxy)
|
||||
.updateContextualEduStats(/* isTrackpadGesture= */ eq(false), eq(GestureType.HOME))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user