Skip to content

Commit 79f4b38

Browse files
committed
allow empty accountName at getting a specific contact info too
1 parent d2d5f30 commit 79f4b38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
216216
val number = getPhoneNumbers(id)[id] ?: ArrayList()
217217
val emails = getEmails(id)[id] ?: ArrayList()
218218
val events = getEvents(id)[id] ?: ArrayList()
219-
val accountName = cursor.getStringValue(ContactsContract.RawContacts.ACCOUNT_NAME)
219+
val accountName = cursor.getStringValue(ContactsContract.RawContacts.ACCOUNT_NAME) ?: ""
220220
val starred = cursor.getIntValue(CommonDataKinds.StructuredName.STARRED)
221221
val contactId = cursor.getIntValue(ContactsContract.Data.CONTACT_ID)
222222
val thumbnailUri = cursor.getStringValue(CommonDataKinds.StructuredName.PHOTO_THUMBNAIL_URI) ?: ""

0 commit comments

Comments
 (0)