use batching at contact deleting
This commit is contained in:
parent
09298c9dde
commit
cd4fceba1b
1 changed files with 5 additions and 0 deletions
|
@ -1227,6 +1227,11 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
withSelection(selection, selectionArgs)
|
||||
operations.add(build())
|
||||
}
|
||||
|
||||
if (operations.size % BATCH_SIZE == 0) {
|
||||
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
|
||||
operations.clear()
|
||||
}
|
||||
}
|
||||
|
||||
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
|
||||
|
|
Loading…
Reference in a new issue