diff options
Diffstat (limited to 'src/com/android')
4 files changed, 8 insertions, 15 deletions
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java index e47dbe535..d9e7d2033 100644 --- a/src/com/android/launcher3/BaseDraggingActivity.java +++ b/src/com/android/launcher3/BaseDraggingActivity.java @@ -141,13 +141,12 @@ public abstract class BaseDraggingActivity extends BaseActivity return new Rect(pos[0], pos[1], pos[0] + v.getWidth(), pos[1] + v.getHeight()); } - public final Bundle getActivityLaunchOptionsAsBundle(View v, boolean useDefaultLaunchOptions) { - ActivityOptions activityOptions = getActivityLaunchOptions(v, useDefaultLaunchOptions); + public final Bundle getActivityLaunchOptionsAsBundle(View v) { + ActivityOptions activityOptions = getActivityLaunchOptions(v); return activityOptions == null ? null : activityOptions.toBundle(); } - public abstract ActivityOptions getActivityLaunchOptions( - View v, boolean useDefaultLaunchOptions); + public abstract ActivityOptions getActivityLaunchOptions(View v); public boolean startActivitySafely(View v, Intent intent, ItemInfo item) { if (mIsSafeModeEnabled && !Utilities.isSystemApp(this, intent)) { @@ -160,7 +159,7 @@ public abstract class BaseDraggingActivity extends BaseActivity boolean useLaunchAnimation = (v != null) && !intent.hasExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION); Bundle optsBundle = useLaunchAnimation - ? getActivityLaunchOptionsAsBundle(v, isInMultiWindowModeCompat()) + ? getActivityLaunchOptionsAsBundle(v) : null; UserHandle user = item == null ? null : item.user; diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index e851499be..1e4743166 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1598,10 +1598,8 @@ public class Launcher extends BaseDraggingActivity @TargetApi(Build.VERSION_CODES.M) @Override - public ActivityOptions getActivityLaunchOptions(View v, boolean useDefaultLaunchOptions) { - return useDefaultLaunchOptions - ? mAppTransitionManager.getDefaultActivityLaunchOptions(this, v) - : mAppTransitionManager.getActivityLaunchOptions(this, v); + public ActivityOptions getActivityLaunchOptions(View v) { + return mAppTransitionManager.getActivityLaunchOptions(this, v); } public LauncherAppTransitionManager getAppTransitionManager() { diff --git a/src/com/android/launcher3/LauncherAppTransitionManager.java b/src/com/android/launcher3/LauncherAppTransitionManager.java index 04f9b3aff..4037a23ff 100644 --- a/src/com/android/launcher3/LauncherAppTransitionManager.java +++ b/src/com/android/launcher3/LauncherAppTransitionManager.java @@ -33,7 +33,7 @@ public class LauncherAppTransitionManager { context, R.string.app_transition_manager_class); } - public ActivityOptions getDefaultActivityLaunchOptions(Launcher launcher, View v) { + public ActivityOptions getActivityLaunchOptions(Launcher launcher, View v) { if (Utilities.ATLEAST_MARSHMALLOW) { int left = 0, top = 0; int width = v.getMeasuredWidth(), height = v.getMeasuredHeight(); @@ -58,8 +58,4 @@ public class LauncherAppTransitionManager { } return null; } - - public ActivityOptions getActivityLaunchOptions(Launcher launcher, View v) { - return getDefaultActivityLaunchOptions(launcher, v); - } } diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java index a20149e1c..3c1cc9057 100644 --- a/src/com/android/launcher3/popup/SystemShortcut.java +++ b/src/com/android/launcher3/popup/SystemShortcut.java @@ -76,7 +76,7 @@ public abstract class SystemShortcut<T extends BaseDraggingActivity> extends Ite BaseDraggingActivity activity, ItemInfo itemInfo) { return (view) -> { Rect sourceBounds = activity.getViewBounds(view); - Bundle opts = activity.getActivityLaunchOptionsAsBundle(view, false); + Bundle opts = activity.getActivityLaunchOptionsAsBundle(view); new PackageManagerHelper(activity).startDetailsActivityForInfo( itemInfo, sourceBounds, opts); activity.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, |