From 68fdeaadc621b7a9200f5c75790eb756a1983d02 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Thu, 2 Apr 2015 11:53:23 -0700 Subject: Stop using custom activity transition, rely on system default in these cases -> workaround for platform issue related to this resource, but also a decent code cleanup issue 20006693 Change-Id: Iea3a2fb14be5ed78d882ddf9d970b12d177f4249 --- res/anim/fade_in_fast.xml | 23 ----------------------- res/anim/fade_out_fast.xml | 23 ----------------------- res/anim/no_anim.xml | 18 ------------------ src/com/android/launcher3/Launcher.java | 7 ++++--- 4 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 res/anim/fade_in_fast.xml delete mode 100644 res/anim/fade_out_fast.xml delete mode 100644 res/anim/no_anim.xml diff --git a/res/anim/fade_in_fast.xml b/res/anim/fade_in_fast.xml deleted file mode 100644 index 4fa9847aa..000000000 --- a/res/anim/fade_in_fast.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/res/anim/fade_out_fast.xml b/res/anim/fade_out_fast.xml deleted file mode 100644 index a061a6ca9..000000000 --- a/res/anim/fade_out_fast.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/res/anim/no_anim.xml b/res/anim/no_anim.xml deleted file mode 100644 index 02b162519..000000000 --- a/res/anim/no_anim.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 0414a5b1e..5b8eaef50 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2939,9 +2939,10 @@ public class Launcher extends Activity } Bundle optsBundle = null; - if (useLaunchAnimation) { - ActivityOptions opts = Utilities.isLmpOrAbove() ? - ActivityOptions.makeCustomAnimation(this, R.anim.task_open_enter, R.anim.no_anim) : + if (useLaunchAnimation && !Utilities.isLmpOrAbove()) { + // On pre-L devices, we use the scale up transition. + // Otherwise we use system default. + ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); optsBundle = opts.toBundle(); } -- cgit v1.2.3