From 7cada7c46b0462bc56d2dc363d61e8967a42001f Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Mon, 30 Sep 2024 15:42:37 -0700 Subject: [PATCH] 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 --- .../inputconsumers/TaskbarUnstashInputConsumer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/inputconsumers/TaskbarUnstashInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/TaskbarUnstashInputConsumer.java index 5ad55ae177..49bff8d065 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/TaskbarUnstashInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/TaskbarUnstashInputConsumer.java @@ -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; }