ignore empty contact addresses

This commit is contained in:
tibbi 2018-08-23 22:27:26 +02:00
parent 57263cce15
commit 389d6e9266
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class ContactsHelper(val activity: Activity) {
if (cursor?.moveToFirst() == true) { if (cursor?.moveToFirst() == true) {
do { do {
val id = cursor.getIntValue(ContactsContract.Data.RAW_CONTACT_ID) val id = cursor.getIntValue(ContactsContract.Data.RAW_CONTACT_ID)
val address = cursor.getStringValue(CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS) ?: "" val address = cursor.getStringValue(CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS) ?: continue
val type = cursor.getIntValue(CommonDataKinds.StructuredPostal.TYPE) val type = cursor.getIntValue(CommonDataKinds.StructuredPostal.TYPE)
if (addresses[id] == null) { if (addresses[id] == null) {