From 838414ab3adf6fe3641101c02133b759cd51c6f8 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Wed, 9 Jun 2021 10:41:02 +0100 Subject: [PATCH] Use FINAL_FRAME for leaving grid animation Bug: 14844554 Test: manual Change-Id: I9a8cf94a448de2520c4cc434f15377fa1f2d202e --- .../uioverrides/BaseRecentsViewStateController.java | 7 ++++--- .../quickstep/fallback/FallbackRecentsStateController.java | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java index 7a968c1799..d74b6c5f1d 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java @@ -17,6 +17,7 @@ package com.android.launcher3.uioverrides; import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT; +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; import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE; @@ -113,9 +114,9 @@ public abstract class BaseRecentsViewStateController mRecentsView, getTaskModalnessProperty(), toState.getOverviewModalness(), config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR)); - setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, - toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f, - INSTANT); + boolean showAsGrid = toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()); + setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS, showAsGrid ? 1f : 0f, + showAsGrid ? INSTANT : FINAL_FRAME); } abstract FloatProperty getTaskModalnessProperty(); diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java index 854067b926..50b69dcff4 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java @@ -15,6 +15,7 @@ */ package com.android.quickstep.fallback; +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; import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL; @@ -93,8 +94,9 @@ public class FallbackRecentsStateController implements StateHandler