am 3290ec4c: Preventing launcher crash because of invalid install shortcut intent
* commit '3290ec4cc220f97460b3b19f28adaf829ea971e1':
Preventing launcher crash because of invalid install shortcut intent
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 27dda64..23bcc85 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -146,10 +146,13 @@
return;
}
- if (DBG) Log.d(TAG, "Got INSTALL_SHORTCUT: " + data.toUri(0));
PendingInstallShortcutInfo info = new PendingInstallShortcutInfo(data, context);
- info = convertToLauncherActivityIfPossible(info);
+ if (info.launchIntent == null || info.label == null) {
+ if (DBG) Log.e(TAG, "Invalid install shortcut intent");
+ return;
+ }
+ info = convertToLauncherActivityIfPossible(info);
queuePendingShortcutInfo(info, context);
}