mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Fixing issue where shortcuts and widgets were not being removed when the package was uninstalled (Bug 2657997, Bug 6335843)
- Also fixes issue if we are dragging a shortcut/widget and it is removed. - Also exposes App Info for shortcuts and widgets Change-Id: I3bd5056f50f20e8b277dde6456df26eac815bcde
This commit is contained in:
@@ -91,7 +91,17 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
return (source instanceof AppsCustomizePagedView) && (info instanceof ApplicationInfo);
|
||||
}
|
||||
private boolean isAllAppsWidget(DragSource source, Object info) {
|
||||
return (source instanceof AppsCustomizePagedView) && (info instanceof PendingAddWidgetInfo);
|
||||
if (source instanceof AppsCustomizePagedView) {
|
||||
if (info instanceof PendingAddItemInfo) {
|
||||
PendingAddItemInfo addInfo = (PendingAddItemInfo) info;
|
||||
switch (addInfo.itemType) {
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private boolean isDragSourceWorkspaceOrFolder(DragObject d) {
|
||||
return (d.dragSource instanceof Workspace) || (d.dragSource instanceof Folder);
|
||||
|
||||
Reference in New Issue
Block a user