fix #630, ask for CALL_PHONE permission at initiating WhatsApp calls
This commit is contained in:
parent
bf0c11016f
commit
f00c333e87
|
@ -62,7 +62,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:02a57ef98a'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:d610f55603'
|
||||
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue