handle null address
This commit is contained in:
parent
32b8dd4d0e
commit
d5c9d32f86
|
@ -233,7 +233,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||||
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) ?: ""
|
||||||
val type = cursor.getIntValue(CommonDataKinds.StructuredPostal.TYPE)
|
val type = cursor.getIntValue(CommonDataKinds.StructuredPostal.TYPE)
|
||||||
|
|
||||||
if (addresses[id] == null) {
|
if (addresses[id] == null) {
|
||||||
|
|
Loading…
Reference in New Issue