Removing support for lagacy shortcuts

> Addition/removal of  shortcus is already removed. This just
  cleans up the unused code path

Bug: 275875209
Test: Updated tests
Flag: N/A
Change-Id: I8ab7f57b693f996920e50e8beecafcffab5167e9
This commit is contained in:
Sunny Goyal
2023-05-01 16:55:59 -07:00
parent ab926886f7
commit e274d97fe5
36 changed files with 470 additions and 760 deletions

View File

@@ -503,7 +503,6 @@ public class LoaderTask implements Runnable {
boolean allowMissingTarget = false;
switch (c.itemType) {
case Favorites.ITEM_TYPE_SHORTCUT:
case Favorites.ITEM_TYPE_APPLICATION:
case Favorites.ITEM_TYPE_DEEP_SHORTCUT:
Intent intent = c.parseIntent();
@@ -517,9 +516,8 @@ public class LoaderTask implements Runnable {
ComponentName cn = intent.getComponent();
String targetPkg = cn == null ? intent.getPackage() : cn.getPackageName();
if (TextUtils.isEmpty(targetPkg)
&& c.itemType != Favorites.ITEM_TYPE_SHORTCUT) {
c.markDeleted("Only legacy shortcuts can have null package");
if (TextUtils.isEmpty(targetPkg)) {
c.markDeleted("Shortcuts can't have null package");
return;
}