Merge "Removing ShortcutInfoCompat and directly using ShortcutInfo" into ub-launcher3-qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-22 22:51:27 +00:00
committed by Android (Google) Code Review
25 changed files with 153 additions and 295 deletions

View File

@@ -33,6 +33,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.ShortcutInfo;
import android.content.res.Resources;
import android.graphics.Matrix;
import android.graphics.Paint;
@@ -67,7 +68,6 @@ import com.android.launcher3.dragndrop.FolderAdaptiveIcon;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.shortcuts.DeepShortcutManager;
import com.android.launcher3.shortcuts.DeepShortcutView;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.widget.PendingAddShortcutInfo;
@@ -625,7 +625,7 @@ public final class Utilities {
/**
* Returns the full drawable for {@param info}.
* @param outObj this is set to the internal data associated with {@param info},
* eg {@link LauncherActivityInfo} or {@link ShortcutInfoCompat}.
* eg {@link LauncherActivityInfo} or {@link ShortcutInfo}.
*/
public static Drawable getFullDrawable(Launcher launcher, ItemInfo info, int width, int height,
boolean flattenDrawable, Object[] outObj) {
@@ -645,7 +645,7 @@ public final class Utilities {
}
ShortcutKey key = ShortcutKey.fromItemInfo(info);
DeepShortcutManager sm = DeepShortcutManager.getInstance(launcher);
List<ShortcutInfoCompat> si = sm.queryForFullDetails(
List<ShortcutInfo> si = sm.queryForFullDetails(
key.componentName.getPackageName(), Arrays.asList(key.getId()), key.user);
if (si.isEmpty()) {
return null;