mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Dragging an icon from prediction row to workspace crashes launcher
Test:Manual Bug:139942462 Change-Id: I5c4a2ca518b08f4ccf47072f8f355e76b7da9424
This commit is contained in:
@@ -2531,22 +2531,22 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
View view;
|
||||
|
||||
switch (info.itemType) {
|
||||
case ITEM_TYPE_APPLICATION:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
|
||||
if (info.container == NO_ID && info instanceof AppInfo) {
|
||||
// Came from all apps -- make a copy
|
||||
info = ((AppInfo) info).makeWorkspaceItem();
|
||||
d.dragInfo = info;
|
||||
}
|
||||
view = mLauncher.createShortcut(cellLayout, (WorkspaceItemInfo) info);
|
||||
break;
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
|
||||
view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
|
||||
(FolderInfo) info);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Unknown item type: " + info.itemType);
|
||||
case ITEM_TYPE_APPLICATION:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
|
||||
if (info instanceof AppInfo) {
|
||||
// Came from all apps -- make a copy
|
||||
info = ((AppInfo) info).makeWorkspaceItem();
|
||||
d.dragInfo = info;
|
||||
}
|
||||
view = mLauncher.createShortcut(cellLayout, (WorkspaceItemInfo) info);
|
||||
break;
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_FOLDER:
|
||||
view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout,
|
||||
(FolderInfo) info);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Unknown item type: " + info.itemType);
|
||||
}
|
||||
|
||||
// First we find the cell nearest to point at which the item is
|
||||
|
||||
Reference in New Issue
Block a user