mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Create new ShortcutInfo when dropping predicted deep shortcuts.
We were modifying the ShortcutInfo for the predicted app in All Apps, so we would display "Remove" instead of "Cancel" because the item was given an id. Bug: 73377438 Change-Id: I1b9788bbf089d304a2868de866c78932fececed9
This commit is contained in:
@@ -2716,10 +2716,16 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
|
||||
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
|
||||
if (info.container == NO_ID && info instanceof AppInfo) {
|
||||
if (info.container == NO_ID) {
|
||||
// Came from all apps -- make a copy
|
||||
info = ((AppInfo) info).makeShortcut();
|
||||
d.dragInfo = info;
|
||||
if (info instanceof AppInfo) {
|
||||
info = ((AppInfo) info).makeShortcut();
|
||||
d.dragInfo = info;
|
||||
} else if (info instanceof ShortcutInfo) {
|
||||
info = new ShortcutInfo((ShortcutInfo) info);
|
||||
d.dragInfo = info;
|
||||
}
|
||||
|
||||
}
|
||||
view = mLauncher.createShortcut(cellLayout, (ShortcutInfo) info);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user