use batching at contact deleting
This commit is contained in:
parent
4ccf328037
commit
fbc1fd6034
|
@ -1240,6 +1240,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 New Issue