Commit 4da2606a authored by Ricki Hirner's avatar Ricki Hirner

Close cursor in queryContacts

parent 114139de
Pipeline #21153746 passed with stages
in 3 minutes and 18 seconds
......@@ -63,7 +63,7 @@ open class AndroidAddressBook<T1: AndroidContact, T2: AndroidGroup>(
fun queryContacts(where: String?, whereArgs: Array<String>?): List<T1> {
val contacts = LinkedList<T1>()
provider!!.query(rawContactsSyncUri(),
null, where, whereArgs, null)?.let { cursor ->
null, where, whereArgs, null)?.use { cursor ->
while (cursor.moveToNext()) {
val values = ContentValues(cursor.columnCount)
DatabaseUtils.cursorRowToContentValues(cursor, values)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment