From 201848bff34f689c568792b49ecc49fbff4ee799 Mon Sep 17 00:00:00 2001 From: Fengjiang Li Date: Thu, 2 Feb 2023 13:01:16 -0800 Subject: [PATCH] [Predictive Back] Remove animation on cancel for all apps to home Framework has supported (ag/20876922) sending back progress on cancel. So no need to re-do the work on app side. Bug: b/267664388 Test: manual, this CL has no visual change Change-Id: I47c751d12a9b2c602ac6f3028665b996990fbd7e --- .../allapps/AllAppsTransitionController.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index f7b0d966f9..394a7d7c35 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -277,17 +277,6 @@ public class AllAppsTransitionController mAllAppScale.updateValue(scaleProgress); } - @Override - public void onBackCancelled(LauncherState toState) { - if (!mLauncher.isInState(ALL_APPS) || !NORMAL.equals(toState)) { - return; - } - - // TODO: once ag/20649618 is picked into tm-qpr, we don't need to animate back on cancel - // swipe because framework will do that for us in {@link #onBackProgressed}. - animateAllAppsToNoScale(); - } - private void onScaleProgressChanged() { final float scaleProgress = mAllAppScale.value; SCALE_PROPERTY.set(mLauncher.getAppsView(), scaleProgress); @@ -312,12 +301,6 @@ public class AllAppsTransitionController } } - private void animateAllAppsToNoScale() { - mAllAppScale.animateToValue(1f) - .setDuration(REVERT_SWIPE_ALL_APPS_TO_HOME_ANIMATION_DURATION_MS) - .start(); - } - /** * Creates an animation which updates the vertical transition progress and updates all the * dependent UI using various animation events