From 48119d438409fbc5b1009f71dd6d90d34e65fe7a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 6 Mar 2023 19:43:04 +0000 Subject: [PATCH] Restore old interpolators for Overview -> Home This regressed due to b/236761067 updating the transition from Split Select to Home (go to Overview, select an app to enter Split screen, but then go home instead of picking the second app to split with). Kept the new interpolators for OVERVIEW_SPLIT_SELECT to home, but restored the old interpolators for OVERVIEW to home Test: Manual, watch transition from Overview to Home, and Split Select to Home Fixes: 269348223 Change-Id: Ifc72f467881e235c24c35d86755dc5db675a9452 --- .../states/QuickstepAtomicAnimationFactory.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index 5eeeb36981..77a94dda92 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -31,6 +31,7 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7; import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.anim.Interpolators.EMPHASIZED_ACCELERATE; import static com.android.launcher3.anim.Interpolators.EMPHASIZED_DECELERATE; +import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; @@ -102,7 +103,10 @@ public class QuickstepAtomicAnimationFactory extends } config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, clampToProgress(LINEAR, 0, 0.25f)); - config.setInterpolator(ANIM_SCRIM_FADE, clampToProgress(LINEAR, 0.33f, 1)); + config.setInterpolator(ANIM_SCRIM_FADE, + fromState == OVERVIEW_SPLIT_SELECT + ? clampToProgress(LINEAR, 0.33f, 1) + : LINEAR); config.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL); config.setInterpolator(ANIM_WORKSPACE_FADE, ACCEL); @@ -111,7 +115,10 @@ public class QuickstepAtomicAnimationFactory extends // Overview is going offscreen, so keep it at its current scale and opacity. config.setInterpolator(ANIM_OVERVIEW_SCALE, FINAL_FRAME); config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME); - config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, EMPHASIZED_DECELERATE); + config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, + fromState == OVERVIEW_SPLIT_SELECT + ? EMPHASIZED_DECELERATE + : clampToProgress(FAST_OUT_SLOW_IN, 0, 0.75f)); config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME); // Scroll RecentsView to page 0 as it goes offscreen, if necessary.