Fixing talk-back folder icon removal regression.
Change-Id: I0b7fff645828d5198500973f1c9ea74f406a1a43
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index e320d4e..84e6b99 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2419,16 +2419,15 @@
* Unbinds the view for the specified item, and removes the item and all its children.
*
* @param v the view being removed.
- * @param containerInfo the {@link FolderInfo} container of this view (can be null).
* @param itemInfo the {@link ItemInfo} for this view.
* @param deleteFromDb whether or not to delete this item from the db.
*/
- public boolean removeItem(View v, FolderInfo containerInfo, ItemInfo itemInfo,
- boolean deleteFromDb) {
+ public boolean removeItem(View v, ItemInfo itemInfo, boolean deleteFromDb) {
if (itemInfo instanceof ShortcutInfo) {
// Remove the shortcut from the folder before removing it from launcher
- if (containerInfo != null) {
- containerInfo.remove((ShortcutInfo) itemInfo);
+ FolderInfo folderInfo = sFolders.get(itemInfo.container);
+ if (folderInfo != null) {
+ folderInfo.remove((ShortcutInfo) itemInfo);
} else {
mWorkspace.removeWorkspaceItem(v);
}