Fix NPE when trying to construct WorkspaceItemInfo with null intent data.

We change the way we parse the install queue; so this seems to be a rare case
when trying to flush an install queue from an old apk with a launcher apk
with the new parsing changes.

Bug: 140935140
Change-Id: I14db4c3f70ed2e1bc5ad31dec7e6473cd6f8f13c
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 670cd28..f19c602 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -631,6 +631,11 @@
     }
 
     private static WorkspaceItemInfo createWorkspaceItemInfo(Intent data, LauncherAppState app) {
+        if (data == null) {
+            Log.e(TAG, "Can't construct WorkspaceItemInfo with null data");
+            return null;
+        }
+
         Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
         String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
         Parcelable bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);