From a0f8368e2e83e67adaef08b0fa9778d3c66a9666 Mon Sep 17 00:00:00 2001 From: minch Date: Thu, 13 Feb 2025 21:27:40 +0000 Subject: [PATCH] Do not translate the AddDesktopButton on dismissing a TaskView Flag: com.android.window.flags.enable_multiple_desktops_frontend Flag: com.android.window.flags.enable_multiple_desktops_backend Bug: 391872496 Test: m Change-Id: I5b91ea1c419958b766db7da2f553f355a3817d2d --- quickstep/src/com/android/quickstep/views/RecentsView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 424271a4c5..7a724d71d8 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4346,6 +4346,11 @@ public abstract class RecentsView< PendingAnimation pendingAnimation, SplitAnimationTimings splitTimings, int index) { + // No need to translate the AddDesktopButton on dismissing a TaskView, which should be + // always at the right most position, even when dismissing the last TaskView. + if (view instanceof AddDesktopButton) { + return; + } FloatProperty translationProperty = view instanceof TaskView ? ((TaskView) view).getPrimaryDismissTranslationProperty() : getPagedOrientationHandler().getPrimaryViewTranslate();