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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user