From 73532bf515148d3716b3c7786832653f401017c3 Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Mon, 30 Sep 2024 15:42:37 -0700 Subject: [PATCH 1/2] 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 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7cada7c46b0462bc56d2dc363d61e8967a42001f) Merged-In: I7d5a95e1a3729e30e5cf588dcf5b823f3d7de93f 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; } From 7b33cd902b095a77483aba1850145f4a3af27477 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Tue, 1 Oct 2024 11:50:54 -0700 Subject: [PATCH 2/2] Fix small bug with TaskView tile expansion There was a small typo that resulted in the wrong measurement being returned for the remaining TaskView. This CL fixes it. Fixes: 365476600 Test: Manual Flag: NONE bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:21f504e0f14f0d3b983bf6694eeda8fc7bedda34) Merged-In: I1abf993abcaa8d06e5475f31c0322017f6e96e6f Change-Id: I1abf993abcaa8d06e5475f31c0322017f6e96e6f --- .../src/com/android/quickstep/util/SplitAnimationController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt index 3449cf2034..f708f4bb39 100644 --- a/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt +++ b/quickstep/src/com/android/quickstep/util/SplitAnimationController.kt @@ -238,7 +238,7 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC taskViewHeight, ) val snapshotViewSize = - if (isPrimaryTaskSplitting) primarySnapshotViewSize else secondarySnapshotViewSize + if (isPrimaryTaskSplitting) secondarySnapshotViewSize else primarySnapshotViewSize if (deviceProfile.isLeftRightSplit) { // Center view first so scaling happens uniformly, alternatively we can move pivotX to 0 val centerThumbnailTranslationX: Float = (taskViewWidth - snapshotViewSize.x) / 2f