Android: безопасность Android 12 и принцип работы корутин

fun Context.showAlertDialog(positiveButtonLable: String = getString(R.string.okay), title: String = getString(R.string.app_name), message: String, actionOnPositveButton: () -> Unit) {
val builder = AlertDialog.Builder(this)
.setTitle(title)
.setMessage(message)
.setCancelable(false)
.setPositiveButton(positiveButtonLable) { dialog, id ->
dialog.cancel()
actionOnPositveButton()
}
val alert = builder.create()
alert?.show()
}
fun Context.showShotToast(message: String){
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
}
fun Context.showLongToast(message: String){
Toast.makeText(this, message, Toast.LENGTH_LONG).show()
}
fun View.showShotSnackbar(message: String){
Snackbar.make(this, message, Snackbar.LENGTH_SHORT).show()
}
fun View.showLongSnackbar(message: String){
Snackbar.make(this, message, Snackbar.LENGTH_LONG).show()
}
fun View.snackBarWithAction(message: String, actionlable: String, block: () -> Unit){
Snackbar.make(this, message, Snackbar.LENGTH_LONG)
.setAction(actionlable) {
block()
}
}
Читать новость в источнике Xakep