Fix crash when trying to sync MMS with no parts

This commit is contained in:
Moez Bhatti
2018-02-14 18:36:31 -05:00
parent 82b5dcddc5
commit b3ccf93f9b
@@ -113,7 +113,7 @@ class CursorToMessage @Inject constructor(
private fun getMmsParts(contentId: Long): List<MmsPart> {
return context.contentResolver.query(CursorToPart.CONTENT_URI, null,
"${Telephony.Mms.Part.MSG_ID} = ?", arrayOf(contentId.toString()), null)
.map { cursorToPart.map(it) }
?.map { cursorToPart.map(it) } ?: listOf()
}
companion object {