adding a menu button for clearing the call history quicker

This commit is contained in:
tibbi
2020-12-31 23:48:14 +01:00
parent 4cbba2457b
commit e477dedf9f
3 changed files with 33 additions and 2 deletions

View File

@ -119,4 +119,13 @@ class RecentsHelper(private val context: Context) {
callback()
}
}
@SuppressLint("MissingPermission")
fun removeAllRecentCalls(callback: () -> Unit) {
ensureBackgroundThread {
val uri = Calls.CONTENT_URI
context.contentResolver.delete(uri, null, null)
callback()
}
}
}