From eec5e3aa95c80aaec034f5af60cf44a1bf5b95e5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 22 Feb 2018 18:18:49 +0100 Subject: [PATCH] fix setting selectionArgs at a specific contact --- .../com/simplemobiletools/contacts/helpers/ContactsHelper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 47790131..c4adc05b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -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