diff options
author | Jon Miranda <jonmiranda@google.com> | 2018-02-13 15:36:20 -0800 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2018-02-13 15:36:20 -0800 |
commit | 84e71bf964988d4296e85d51f5266d41bcda0285 (patch) | |
tree | 77fce4297be749e2310d6db8f8ba53d7b5bdaaa6 | |
parent | d766aadae747d873b77dfcb436271eda5aa82f68 (diff) | |
download | android_packages_apps_Trebuchet-84e71bf964988d4296e85d51f5266d41bcda0285.tar.gz android_packages_apps_Trebuchet-84e71bf964988d4296e85d51f5266d41bcda0285.tar.bz2 android_packages_apps_Trebuchet-84e71bf964988d4296e85d51f5266d41bcda0285.zip |
Enable new opening app transitions for shortcuts.
Platform change: I9a854d43c65c8fa69bf16ccfbed86e8e681a095b
Bug: 70220260
Change-Id: Ic94b6d69c83116c1c21f99a4b2fba94ff62b61b0
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 4d820bc0b..3fde58b3d 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1975,18 +1975,12 @@ public class Launcher extends BaseActivity return mAppLaunchSuccess; } - boolean isShortcut = Utilities.ATLEAST_MARSHMALLOW - && (item instanceof ShortcutInfo) - && (item.itemType == Favorites.ITEM_TYPE_SHORTCUT - || item.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT) - && !((ShortcutInfo) item).isPromise(); - // Only launch using the new animation if the shortcut has not opted out (this is a // private contract between launcher and may be ignored in the future). boolean useLaunchAnimation = (v != null) && !intent.hasExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION); Bundle optsBundle = useLaunchAnimation - ? getActivityLaunchOptions(v, isShortcut || isInMultiWindowModeCompat()) + ? getActivityLaunchOptions(v, isInMultiWindowModeCompat()) : null; UserHandle user = item == null ? null : item.user; @@ -1997,6 +1991,11 @@ public class Launcher extends BaseActivity intent.setSourceBounds(getViewBounds(v)); } try { + boolean isShortcut = Utilities.ATLEAST_MARSHMALLOW + && (item instanceof ShortcutInfo) + && (item.itemType == Favorites.ITEM_TYPE_SHORTCUT + || item.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT) + && !((ShortcutInfo) item).isPromise(); if (isShortcut) { // Shortcuts need some special checks due to legacy reasons. startShortcutIntentSafely(intent, optsBundle, item); |