Fixing issue where items that were not yet added were not removed from the db. (Bug 6428418)

Change-Id: I8f76af1ccaa2bc5053f3e1f6606202310855aaae
This commit is contained in:
Winson Chung committed 2012-05-04 10:23:38 -07:00
1 parent 2ceccf83f4
commit 2efec4e29f
2 files changed
+66 -16

No files matched your search

@@ -1674,6 +1674,24 @@ public class LauncherModel extends BroadcastReceiver {
}
}
/**
* Returns all the Workspace ShortcutInfos associated with a particular package.
* @param intent
* @return
*/
ArrayList<ShortcutInfo> getShortcutInfosForPackage(String packageName) {
ArrayList<ShortcutInfo> infos = new ArrayList<ShortcutInfo>();
for (ItemInfo i : sWorkspaceItems) {
if (i instanceof ShortcutInfo) {
ShortcutInfo info = (ShortcutInfo) i;
if (info.intent.getPackage().equals(packageName)) {
infos.add(info);
}
}
}
return infos;
}
/**
* This is called from the code that adds shortcuts from the intent receiver. This
* doesn't have a Cursor, but