Fixing issue where we were not removing items from LauncherModel and only the add-queue. (Bug 7078244)

Change-Id: I5660b447521646f820fb2497f327e965d99ac207
This commit is contained in:
Winson Chung
2012-08-30 17:16:53 -07:00
parent 5a0f45fe27
commit 8a4351063f
2 changed files with 28 additions and 0 deletions
+10
View File
@@ -3697,6 +3697,8 @@ public class Workspace extends SmoothPagedView
}
// Clean up new-apps animation list
final LauncherModel model = mLauncher.getModel();
final Context context = getContext();
post(new Runnable() {
@Override
public void run() {
@@ -3717,6 +3719,14 @@ public class Workspace extends SmoothPagedView
if (packageNames.contains(pn)) {
iter.remove();
}
// It is possible that we've queued an item to be loaded, yet it has
// not been added to the workspace, so remove those items as well.
ArrayList<ItemInfo> shortcuts =
model.getWorkspaceShortcutItemInfosWithIntent(intent);
for (ItemInfo info : shortcuts) {
model.deleteItemFromDatabase(context, info);
}
} catch (URISyntaxException e) {}
}
}