ShortcutInfo renamed to WorkspaceItemInfo

Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
This commit is contained in:
Sunny Goyal
2019-03-27 16:03:06 -07:00
parent 1f457ae87f
commit 9589916418
53 changed files with 317 additions and 329 deletions

View File

@@ -16,8 +16,6 @@
package com.android.launcher3;
import static com.android.launcher3.model.AppLaunchTracker.CONTAINER_SEARCH;
import android.app.ActivityOptions;
import android.content.ActivityNotFoundException;
import android.content.Intent;
@@ -169,10 +167,10 @@ public abstract class BaseDraggingActivity extends BaseActivity
intent.setSourceBounds(getViewBounds(v));
}
try {
boolean isShortcut = (item instanceof ShortcutInfo)
boolean isShortcut = (item instanceof WorkspaceItemInfo)
&& (item.itemType == Favorites.ITEM_TYPE_SHORTCUT
|| item.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT)
&& !((ShortcutInfo) item).isPromise();
&& !((WorkspaceItemInfo) item).isPromise();
if (isShortcut) {
// Shortcuts need some special checks due to legacy reasons.
startShortcutIntentSafely(intent, optsBundle, item, sourceContainer);
@@ -209,7 +207,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
.penaltyLog().build());
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
String id = ((ShortcutInfo) info).getDeepShortcutId();
String id = ((WorkspaceItemInfo) info).getDeepShortcutId();
String packageName = intent.getPackage();
DeepShortcutManager.getInstance(this).startShortcut(
packageName, id, intent.getSourceBounds(), optsBundle, info.user);