diff options
Diffstat (limited to 'src/com/android/launcher3/DeleteDropTarget.java')
-rw-r--r-- | src/com/android/launcher3/DeleteDropTarget.java | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java index a8ac0746c..c76425a5e 100644 --- a/src/com/android/launcher3/DeleteDropTarget.java +++ b/src/com/android/launcher3/DeleteDropTarget.java @@ -266,19 +266,8 @@ public class DeleteDropTarget extends ButtonDropTarget { private boolean isUninstallFromWorkspace(DragObject d) { if (AppsCustomizePagedView.DISABLE_ALL_APPS && isWorkspaceOrFolderApplication(d)) { ShortcutInfo shortcut = (ShortcutInfo) d.dragInfo; - if (shortcut.intent != null && shortcut.intent.getComponent() != null) { - Set<String> categories = shortcut.intent.getCategories(); - boolean includesLauncherCategory = false; - if (categories != null) { - for (String category : categories) { - if (category.equals(Intent.CATEGORY_LAUNCHER)) { - includesLauncherCategory = true; - break; - } - } - } - return includesLauncherCategory; - } + // Only allow manifest shortcuts to initiate an un-install. + return !InstallShortcutReceiver.isValidShortcutLaunchIntent(shortcut.intent); } return false; } |