Requiring key chord to delete icons and folders on the workspace

- Also fixing case where the all apps button to search for more apps
  was not focusable

Bug: 20639227
Change-Id: Ie4d9092e654d3cafc0eb346b3bb744ec3e295e92
This commit is contained in:
Winson
2015-09-14 12:01:13 -07:00
committed by Winson Chung
parent 787e3fbcaf
commit fa56b3f2f1
6 changed files with 74 additions and 32 deletions

View File

@@ -70,8 +70,10 @@ public class DeleteDropTarget extends ButtonDropTarget {
* @return true if the item was removed.
*/
public static boolean removeWorkspaceOrFolderItem(Launcher launcher, ItemInfo item, View view) {
// Remove the item from launcher and the db
launcher.removeItem(view, item, true /* deleteFromDb */);
// Remove the item from launcher and the db, we can ignore the containerInfo in this call
// because we already remove the drag view from the folder (if the drag originated from
// a folder) in Folder.beginDrag()
launcher.removeItem(view, null, item, true /* deleteFromDb */);
launcher.getWorkspace().stripEmptyScreens();
return true;
}