summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2015-05-22 14:36:14 -0700
committerAdam Cohen <adamcohen@google.com>2015-05-22 16:19:42 -0700
commitc3d4553d462521bc77b719109ea8cf5b5812d471 (patch)
treec8e7b3255d6c028f58b172a87d2c604c849e01b6 /src
parenta6095969bb5938ad95ee9f858970d5eb54eb124d (diff)
downloadandroid_packages_apps_Trebuchet-c3d4553d462521bc77b719109ea8cf5b5812d471.tar.gz
android_packages_apps_Trebuchet-c3d4553d462521bc77b719109ea8cf5b5812d471.tar.bz2
android_packages_apps_Trebuchet-c3d4553d462521bc77b719109ea8cf5b5812d471.zip
[DO NOT MERGE] Use custom slide-up animation on LMP MR1 instead of system default
issue 21402755 Change-Id: I87ddef08e7b3134c791f769fc279e62d520cd18c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java7
-rw-r--r--src/com/android/launcher3/Utilities.java4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2fc3b75ea..48f390145 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 1a9b9a16c..11c63d009 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.