From 96bed75d9f65bd8adeb5858d5508a0438d0db1ca Mon Sep 17 00:00:00 2001 From: Saumya Prakash Date: Tue, 27 Sep 2022 15:15:26 +0000 Subject: [PATCH] Updated overview exit animation for 3 button navigation Changed overview exit animation so that tiles don't slide off and only fade/scale in place for 3 button navigation. Previously, tiles would slide off when exiting for both gesture navigation and 3 button navigation. Now 3 button navigation exits with tiles staying in place. Test: Manual Fix: 245745939 Change-Id: I4144ed7e3ff29419df7fb13b6417ccc0a1f9dd45 --- .../states/QuickstepAtomicAnimationFactory.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index f75a404821..1e90aaf433 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -113,19 +113,19 @@ public class QuickstepAtomicAnimationFactory extends config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME); config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, EMPHASIZED_DECELERATE); config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME); + + // Scroll RecentsView to page 0 as it goes offscreen, if necessary. + int numPagesToScroll = overview.getNextPage() - DEFAULT_PAGE; + long scrollDuration = Math.min(MAX_PAGE_SCROLL_DURATION, + numPagesToScroll * PER_PAGE_SCROLL_DURATION); + config.duration = Math.max(config.duration, scrollDuration); + overview.snapToPage(DEFAULT_PAGE, Math.toIntExact(config.duration)); } else { config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, ACCEL_DEACCEL); config.setInterpolator(ANIM_OVERVIEW_SCALE, clampToProgress(ACCEL, 0, 0.9f)); config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL_1_7); } - // Scroll RecentsView to page 0 as it goes offscreen, if necessary. - int numPagesToScroll = overview.getNextPage() - DEFAULT_PAGE; - long scrollDuration = Math.min(MAX_PAGE_SCROLL_DURATION, - numPagesToScroll * PER_PAGE_SCROLL_DURATION); - config.duration = Math.max(config.duration, scrollDuration); - overview.snapToPage(DEFAULT_PAGE, Math.toIntExact(config.duration)); - Workspace workspace = mActivity.getWorkspace(); // Start from a higher workspace scale, but only if we're invisible so we don't jump. boolean isWorkspaceVisible = workspace.getVisibility() == VISIBLE;