return empty contact source type for empty account names
This commit is contained in:
parent
c72a3cd604
commit
8317a267b4
|
@ -253,6 +253,10 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
}
|
||||
|
||||
private fun getContactSourceType(accountName: String): String {
|
||||
if (accountName.isEmpty()) {
|
||||
return ""
|
||||
}
|
||||
|
||||
val uri = ContactsContract.RawContacts.CONTENT_URI
|
||||
val projection = arrayOf(ContactsContract.RawContacts.ACCOUNT_TYPE)
|
||||
val selection = "${ContactsContract.RawContacts.ACCOUNT_NAME} = ?"
|
||||
|
|
Loading…
Reference in New Issue