summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r--src/com/android/launcher2/Workspace.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 504f9dcfe..897e95a1f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -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) {}
}
}