Add null pointer checks to fix NPEs

Bug: 6611233
Bug: 6685401

Change-Id: I804dfe0a7ad36b43168f7384ef88459d765fff6b
This commit is contained in:
Michael Jurka committed 2012-06-18 10:40:03 -07:00
1 parent a35a7807c2
commit 5649c28703
2 files changed
+4 -1

No files matched your search

@@ -169,6 +169,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
if (intent.getAction() == null) {
intent.setAction(Intent.ACTION_VIEW);
} else if (intent.getAction().equals(Intent.ACTION_MAIN) &&
intent.getCategories() != null &&
intent.getCategories().contains(Intent.CATEGORY_LAUNCHER)) {
intent.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);