fix setting selectionArgs at a specific contact

This commit is contained in:
tibbi 2018-02-22 18:18:49 +01:00
parent 740dfb090e
commit eec5e3aa95
1 changed files with 2 additions and 2 deletions

View File

@ -233,11 +233,11 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
)
var selection = "${ContactsContract.Data.MIMETYPE} = ?"
val selectionArgs = arrayOf(CommonDataKinds.Event.CONTENT_ITEM_TYPE)
var selectionArgs = arrayOf(CommonDataKinds.Event.CONTENT_ITEM_TYPE)
if (contactId != null) {
selection += " AND ${ContactsContract.Data.RAW_CONTACT_ID} = ?"
selectionArgs[1] = contactId.toString()
selectionArgs = arrayOf(CommonDataKinds.Event.CONTENT_ITEM_TYPE, contactId.toString())
}
var cursor: Cursor? = null