From 1c84b90fe2e400db15f6d78c94bd28d1f87ce8e1 Mon Sep 17 00:00:00 2001 From: Gustav Sennton Date: Tue, 28 Jan 2025 14:54:29 +0000 Subject: [PATCH] Add CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE to launcher side Move the CUJ to where the actual animation is taking place, so we can target the correct surface/leash. Bug: 374214290 Flag: NONE jank logging Test: manual Change-Id: Iccb30ff7ceee84b68428606575e1b8588eeb8aa9 --- .../src/com/android/launcher3/QuickstepTransitionManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index f38693d66b..15176a7110 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1746,6 +1746,10 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener if (rectFSpringAnim != null && anim.getChildAnimations().isEmpty()) { addCujInstrumentation(rectFSpringAnim, Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); } else { + if (isFreeformAnimation(appTargets)) { + addCujInstrumentation(anim, + Cuj.CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE); + } addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME);