prevent MMS notification NPE

// FREEBIE
This commit is contained in:
Jake McGinty
2014-08-10 13:57:42 -07:00
parent 7b41b1492e
commit b61e7839f4
2 changed files with 29 additions and 1 deletions

View File

@@ -58,7 +58,7 @@ public class MmsReceiver {
PduParser parser = new PduParser(mmsData);
GenericPdu pdu = parser.parse();
if (pdu.getMessageType() == PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND) {
if (pdu != null && pdu.getMessageType() == PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND) {
MmsDatabase database = DatabaseFactory.getMmsDatabase(context);
Pair<Long, Long> messageAndThreadId = database.insertMessageInbox((NotificationInd)pdu);