mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
fix #91, properly handle third party intent with Phone mimetype
This commit is contained in:
@ -980,11 +980,11 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||
return ""
|
||||
}
|
||||
|
||||
fun getContactDataId(contactId: String): String {
|
||||
fun getContactMimeTypeId(contactId: String, mimeType: String): String {
|
||||
val uri = ContactsContract.Data.CONTENT_URI
|
||||
val projection = arrayOf(ContactsContract.Data._ID, ContactsContract.Data.RAW_CONTACT_ID, ContactsContract.Data.MIMETYPE)
|
||||
val selection = "${ContactsContract.Data.MIMETYPE} = ? AND ${ContactsContract.Data.RAW_CONTACT_ID} = ?"
|
||||
val selectionArgs = arrayOf(CommonDataKinds.Email.CONTENT_ITEM_TYPE, contactId)
|
||||
val selectionArgs = arrayOf(mimeType, contactId)
|
||||
|
||||
var cursor: Cursor? = null
|
||||
try {
|
||||
|
Reference in New Issue
Block a user