mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
fix #630, ask for CALL_PHONE permission at initiating WhatsApp calls
This commit is contained in:
@ -707,6 +707,14 @@ class ViewContactActivity : ContactActivity() {
|
||||
flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
try {
|
||||
startActivity(this)
|
||||
} catch (e: SecurityException) {
|
||||
handlePermission(PERMISSION_CALL_PHONE) { success ->
|
||||
if (success) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
toast(R.string.no_phone_call_permission)
|
||||
}
|
||||
}
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
toast(R.string.no_app_found)
|
||||
} catch (e: Exception) {
|
||||
|
Reference in New Issue
Block a user