mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Starting measuring displacement from the edge of the slop zone
This makes displacement calculations robust against skipped MOVE events Test: presubmit Bug: 297377792 Flag: N/A Change-Id: I6c2c3486139baa5e456c6787c2afc7b3f7fe7cfd
This commit is contained in:
@@ -154,6 +154,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
|
||||
mSquaredTouchSlop = mDeviceState.getSquaredTouchSlop();
|
||||
|
||||
mPassedPilferInputSlop = mPassedWindowMoveSlop = continuingPreviousGesture;
|
||||
mStartDisplacement = continuingPreviousGesture ? 0 : -mTouchSlop;
|
||||
mDisableHorizontalSwipe = !mPassedPilferInputSlop && disableHorizontalSwipe;
|
||||
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
|
||||
}
|
||||
@@ -280,7 +281,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
|
||||
if (mGestureState.isTrackpadGesture() || Math.abs(displacement)
|
||||
> mTouchSlop) {
|
||||
mPassedWindowMoveSlop = true;
|
||||
mStartDisplacement = Math.min(displacement, -mTouchSlop);
|
||||
mStartDisplacement = -mTouchSlop;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +337,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
|
||||
}
|
||||
if (!mPassedWindowMoveSlop) {
|
||||
mPassedWindowMoveSlop = true;
|
||||
mStartDisplacement = Math.min(displacement, -mTouchSlop);
|
||||
mStartDisplacement = -mTouchSlop;
|
||||
}
|
||||
notifyGestureStarted(isLikelyToStartNewTask);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user