fix #630, ask for CALL_PHONE permission at initiating WhatsApp calls

This commit is contained in:
tibbi
2022-02-07 16:19:29 +01:00
parent bf0c11016f
commit f00c333e87
2 changed files with 9 additions and 1 deletions

View File

@ -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) {