From 79f4b38c8c5f2593037de10639a29988e4909878 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Jan 2018 21:18:31 +0100 Subject: [PATCH] allow empty accountName at getting a specific contact info too --- .../com/simplemobiletools/contacts/helpers/ContactsHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt index af03044a..6827551e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -216,7 +216,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) { val number = getPhoneNumbers(id)[id] ?: ArrayList() val emails = getEmails(id)[id] ?: ArrayList() val events = getEvents(id)[id] ?: ArrayList() - val accountName = cursor.getStringValue(ContactsContract.RawContacts.ACCOUNT_NAME) + val accountName = cursor.getStringValue(ContactsContract.RawContacts.ACCOUNT_NAME) ?: "" val starred = cursor.getIntValue(CommonDataKinds.StructuredName.STARRED) val contactId = cursor.getIntValue(ContactsContract.Data.CONTACT_ID) val thumbnailUri = cursor.getStringValue(CommonDataKinds.StructuredName.PHOTO_THUMBNAIL_URI) ?: ""