mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
updating the way permissions are handled
This commit is contained in:
@ -1318,7 +1318,7 @@ class ContactsHelper(val activity: Activity) {
|
||||
fun getRecents(callback: (ArrayList<RecentCall>) -> Unit) {
|
||||
Thread {
|
||||
val calls = ArrayList<RecentCall>()
|
||||
if (!activity.hasPermission(PERMISSION_WRITE_CALL_LOG)) {
|
||||
if (!activity.hasPermission(PERMISSION_WRITE_CALL_LOG) || !activity.hasPermission(PERMISSION_READ_CALL_LOG)) {
|
||||
callback(calls)
|
||||
return@Thread
|
||||
}
|
||||
|
Reference in New Issue
Block a user