updating commons, kotlin + add some keyboard hiding
This commit is contained in:
parent
54e02171f5
commit
8336ec0052
8 changed files with 13 additions and 17 deletions
|
|
@ -938,18 +938,3 @@ fun Context.getFileSizeFromUri(uri: Uri): Long {
|
|||
return FILE_SIZE_NONE
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) {
|
||||
Intent(Intent.ACTION_DIAL).apply {
|
||||
data = Uri.fromParts("tel", phoneNumber, null)
|
||||
|
||||
try {
|
||||
startActivity(this)
|
||||
callback?.invoke()
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
toast(R.string.no_app_found)
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue