am 3c24aca5: Don\'t crash when adding a shortcut.
Merge commit '3c24aca5f597f2eb90e53dce450197e2f46c2305' into eclair-plus-aosp
* commit '3c24aca5f597f2eb90e53dce450197e2f46c2305':
Don't crash when adding a shortcut.
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index b93965b..f3ffeaf 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -963,7 +963,7 @@
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
- if (info.container == NO_ID) {
+ if (info.container == NO_ID && info instanceof ApplicationInfo) {
// Came from all apps -- make a copy
info = new ShortcutInfo((ApplicationInfo)info);
}