fix #135, delete carddav contacts from RawContacts table
This commit is contained in:
parent
d2ce5f2772
commit
09298c9dde
|
@ -1220,10 +1220,10 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
|
||||
try {
|
||||
val operations = ArrayList<ContentProviderOperation>()
|
||||
val selection = "${ContactsContract.Data.CONTACT_ID} = ?"
|
||||
val selection = "${ContactsContract.RawContacts._ID} = ?"
|
||||
contacts.filter { it.source != SMT_PRIVATE }.forEach {
|
||||
ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI).apply {
|
||||
val selectionArgs = arrayOf(it.contactId.toString())
|
||||
ContentProviderOperation.newDelete(ContactsContract.RawContacts.CONTENT_URI).apply {
|
||||
val selectionArgs = arrayOf(it.id.toString())
|
||||
withSelection(selection, selectionArgs)
|
||||
operations.add(build())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue