From ad6f276670443ac8f9b73497dae185bb005c3a76 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 13 Jun 2014 09:41:09 -0700 Subject: [PATCH] Enabling Home->Recents transition. --- packages/SystemUI/res/values/config.xml | 6 ++++-- .../src/com/android/systemui/recents/Constants.java | 2 +- .../com/android/systemui/recents/RecentsConfiguration.java | 3 +++ .../src/com/android/systemui/recents/views/TaskView.java | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 09a94f50df65b..c8851dc7d83cf 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -120,11 +120,13 @@ duration of the transition in to recents. --> 225 + 225 + 125 - 325 + 275 - 16 + 10 400 diff --git a/packages/SystemUI/src/com/android/systemui/recents/Constants.java b/packages/SystemUI/src/com/android/systemui/recents/Constants.java index cd4d206fcd4f9..1d355cd2daf4b 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/Constants.java +++ b/packages/SystemUI/src/com/android/systemui/recents/Constants.java @@ -26,7 +26,7 @@ public class Constants { public static class App { // Enables the home->Recents transition - public static final boolean EnableHomeTransition = false; + public static final boolean EnableHomeTransition = true; // Enables the screenshot app->Recents transition public static final boolean EnableScreenshotAppTransition = false; // Enables the filtering of tasks according to their grouping diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java index b1f37336f8996..433dcb4988eb2 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java @@ -70,6 +70,7 @@ public class RecentsConfiguration { /** Task view animation and styles */ public int taskViewEnterFromHomeDuration; public int taskViewEnterFromHomeDelay; + public int taskViewExitToHomeDuration; public int taskViewRemoveAnimDuration; public int taskViewRemoveAnimTranslationXPx; public int taskViewTranslationZMinPx; @@ -174,6 +175,8 @@ public class RecentsConfiguration { res.getInteger(R.integer.recents_animate_task_enter_from_home_duration); taskViewEnterFromHomeDelay = res.getInteger(R.integer.recents_animate_task_enter_from_home_delay); + taskViewExitToHomeDuration = + res.getInteger(R.integer.recents_animate_task_exit_to_home_duration); taskViewRemoveAnimDuration = res.getInteger(R.integer.recents_animate_task_view_remove_duration); taskViewRemoveAnimTranslationXPx = diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java index 7376255b3e7b5..ffd41357047f6 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java @@ -327,8 +327,8 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks, View.On animate() .translationY(ctx.offscreenTranslationY) .setStartDelay(0) - .setInterpolator(mConfig.fastOutSlowInInterpolator) - .setDuration(mConfig.taskViewEnterFromHomeDuration) + .setInterpolator(mConfig.fastOutLinearInInterpolator) + .setDuration(mConfig.taskViewExitToHomeDuration) .withLayer() .withEndAction(ctx.postAnimationTrigger.decrementAsRunnable()) .start();