Prevent the creation of Shorcuts with null intents (issue 5629292)
Change-Id: I54fbad2d4af27c6d8fc0d79c33e890298a3db4dc
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 6ea14db..e489e46 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -873,6 +873,9 @@
boolean foundCellSpan = false;
ShortcutInfo info = mModel.infoFromShortcutIntent(this, data, null);
+ if (info == null) {
+ return;
+ }
final View view = createShortcut(info);
// First we check if we already know the exact location where we want to add this item.