diff --git a/res/anim/no_anim.xml b/res/anim/no_anim.xml new file mode 100644 index 0000000000..02b162519a --- /dev/null +++ b/res/anim/no_anim.xml @@ -0,0 +1,18 @@ + + + + diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 2fc3b75eab..48f3901455 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2943,10 +2943,15 @@ public class Launcher extends Activity Bundle optsBundle = null; 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(); + } else if (useLaunchAnimation && Utilities.isLmpMr1()) { + // On L-MR1 devices, we use custom slide up animation without a delay + // On L devices, we use the system default slide up. + ActivityOptions opts = ActivityOptions.makeCustomAnimation(this, + R.anim.task_open_enter, R.anim.no_anim); + optsBundle = opts.toBundle(); } if (user == null || user.equals(UserHandleCompat.myUserHandle())) { diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 1a9b9a16cc..11c63d0090 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -112,6 +112,10 @@ public final class Utilities { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; } + public static boolean isLmpMr1() { + return Build.VERSION.SDK_INT == 22; + } + /** * Returns a bitmap suitable for the all apps view. If the package or the resource do not * exist, it returns null.