forked from github/wulkanowy-mirror
Fix crash in school info when dialer is unavailable (#1500)
This commit is contained in:
parent
e665a8f18b
commit
8528e0beff
@ -102,7 +102,9 @@ fun Context.openNavigation(location: String) {
|
||||
fun Context.openDialer(phone: String) {
|
||||
val intentUri = Uri.parse("tel:$phone")
|
||||
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
||||
startActivity(intent)
|
||||
if (intent.resolveActivity(packageManager) != null) {
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.shareText(text: String, subject: String?) {
|
||||
|
Loading…
Reference in New Issue
Block a user