Two Taskbar Bug

This cl fixes two taskbar bug being present when invoking CtS.

Solution: simply measure displacement and compare that with slop to animate taksbar background or not.

Test: Presubmit
Bug: 360116669
Flag: EXEMPT Bug Fix

Change-Id: I7d5a95e1a3729e30e5cf588dcf5b823f3d7de93f
This commit is contained in:
Jagrut Desai
2024-09-30 15:42:37 -07:00
parent 2b1208e803
commit 7cada7c46b
@@ -228,10 +228,13 @@ public class TaskbarUnstashInputConsumer extends DelegateInputConsumer {
}
float velocityYPxPerS = mVelocityTracker.getYVelocity();
float dY = Math.abs(mLastPos.y - mDownPos.y);
if (mCanPlayTaskbarBgAlphaAnimation
&& mMotionMoveCount >= NUM_MOTION_MOVE_THRESHOLD // Arbitrary value
&& velocityYPxPerS != 0 // Ignore these
&& velocityYPxPerS >= mTaskbarSlowVelocityYThreshold) {
&& velocityYPxPerS >= mTaskbarSlowVelocityYThreshold
&& dY != 0
&& dY > mTouchSlop) {
mTaskbarActivityContext.playTaskbarBackgroundAlphaAnimation();
mCanPlayTaskbarBgAlphaAnimation = false;
}