Crashlytics #4

This commit is contained in:
Moez Bhatti
2015-12-22 13:23:18 -05:00
parent f66595dd67
commit d9eaf0ad23
@@ -458,7 +458,10 @@ public class SmsHelper {
do { do {
Uri threadUri = Uri.withAppendedPath(Message.MMS_SMS_CONTENT_PROVIDER, conversationCursor.getString(Conversation.ID)); Uri threadUri = Uri.withAppendedPath(Message.MMS_SMS_CONTENT_PROVIDER, conversationCursor.getString(Conversation.ID));
Cursor messageCursor = context.getContentResolver().query(threadUri, MessageColumns.PROJECTION, SmsHelper.UNREAD_SELECTION, null, SmsHelper.sortDateDesc); Cursor messageCursor = context.getContentResolver().query(threadUri, MessageColumns.PROJECTION, SmsHelper.UNREAD_SELECTION, null, SmsHelper.sortDateDesc);
result += messageCursor.getCount(); if (messageCursor != null) {
result += messageCursor.getCount();
messageCursor.close();
}
} while (conversationCursor.moveToNext()); } while (conversationCursor.moveToNext());
} }