Close the cursor after use

This commit is contained in:
Naveen 2022-06-21 01:52:12 +05:30
parent deec462b9c
commit b70ccfa183

View File

@ -163,6 +163,7 @@ class RecentsHelper(private val context: Context) {
previousRecentCallFrom = "$number$name$simID" previousRecentCallFrom = "$number$name$simID"
} while (cursor.moveToNext()) } while (cursor.moveToNext())
} }
cursor?.close()
val blockedNumbers = context.getBlockedNumbers() val blockedNumbers = context.getBlockedNumbers()
recentCalls = recentCalls.filter { !context.isNumberBlocked(it.phoneNumber, blockedNumbers) }.toMutableList() as ArrayList<RecentCall> recentCalls = recentCalls.filter { !context.isNumberBlocked(it.phoneNumber, blockedNumbers) }.toMutableList() as ArrayList<RecentCall>