Prevent the creation of Shorcuts with null intents (issue 5629292)

Change-Id: I54fbad2d4af27c6d8fc0d79c33e890298a3db4dc
This commit is contained in:
Adam Cohen
2011-11-22 16:42:47 -08:00
parent d016015c23
commit d919882006
4 changed files with 22 additions and 4 deletions
+3 -1
View File
@@ -2455,7 +2455,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