mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 23:02:45 +01:00
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) {
|
fun Context.openDialer(phone: String) {
|
||||||
val intentUri = Uri.parse("tel:$phone")
|
val intentUri = Uri.parse("tel:$phone")
|
||||||
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
||||||
|
if (intent.resolveActivity(packageManager) != null) {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.shareText(text: String, subject: String?) {
|
fun Context.shareText(text: String, subject: String?) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user