From 45c8048f4f8996f085c78621efaf710c907ce213 Mon Sep 17 00:00:00 2001 From: Manu Cornet Date: Tue, 20 Dec 2016 18:42:16 -0800 Subject: [PATCH] 2D Recents: to and from home, animate task views as a block Bug: 32101881 Test: Checked animations to/from home on local sw600dp device Change-Id: I74b8b02bb39be6d4e4553f7d74550ff177d47a5e --- .../systemui/recents/views/TaskStackAnimationHelper.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java index ed86d4cf55be2..a2ee4c565ff8f 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java @@ -105,6 +105,7 @@ public class TaskStackAnimationHelper { private static final Interpolator ENTER_WHILE_DOCKING_INTERPOLATOR = Interpolators.LINEAR_OUT_SLOW_IN; + private final int mEnterAndExitFromHomeTranslationOffset; private TaskStackView mStackView; private TaskViewTransform mTmpTransform = new TaskViewTransform(); @@ -113,6 +114,8 @@ public class TaskStackAnimationHelper { public TaskStackAnimationHelper(Context context, TaskStackView stackView) { mStackView = stackView; + mEnterAndExitFromHomeTranslationOffset = Recents.getConfiguration().isGridEnabled + ? 0 : DOUBLE_FRAME_OFFSET_MS; } /** @@ -260,7 +263,7 @@ public class TaskStackAnimationHelper { AnimationProps taskAnimation = new AnimationProps() .setInitialPlayTime(AnimationProps.BOUNDS, Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) * - DOUBLE_FRAME_OFFSET_MS) + mEnterAndExitFromHomeTranslationOffset) .setStartDelay(AnimationProps.ALPHA, Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS, taskIndexFromFront) * FRAME_OFFSET_MS) @@ -321,7 +324,7 @@ public class TaskStackAnimationHelper { AnimationProps taskAnimation; if (animated) { int delay = Math.min(ENTER_EXIT_NUM_ANIMATING_TASKS , taskIndexFromFront) * - DOUBLE_FRAME_OFFSET_MS; + mEnterAndExitFromHomeTranslationOffset; taskAnimation = new AnimationProps() .setStartDelay(AnimationProps.BOUNDS, delay) .setDuration(AnimationProps.BOUNDS, EXIT_TO_HOME_TRANSLATION_DURATION)