Merge "Prevent the creation of Shorcuts with null intents (issue 5629292)" into ics-mr1

This commit is contained in:
Adam Cohen
2011-11-23 14:37:59 -08:00
committed by Android (Google) Code Review
4 changed files with 22 additions and 4 deletions
+3 -1
View File
@@ -2472,7 +2472,9 @@ public class Workspace extends SmoothPagedView
if (isShortcut) {
final Intent intent = data.getItemAt(index).getIntent();
Object info = model.infoFromShortcutIntent(mContext, intent, data.getIcon());
onDropExternal(new int[] { x, y }, info, layout, false);
if (info != null) {
onDropExternal(new int[] { x, y }, info, layout, false);
}
} else {
if (widgets.size() == 1) {
// If there is only one item, then go ahead and add and configure