withApiLevel

@ChecksSdkIntAtLeast(parameter = 0, lambda = 1)
inline fun withApiLevel(versionCode: Int, since: () -> Unit)

Execute since if the current sdk version is at least versionCode. Version code comes from Build.VERSION_CODES.


@ChecksSdkIntAtLeast(parameter = 0, lambda = 2)
inline fun <R> withApiLevel(versionCode: Int, below: () -> R, since: () -> R): R

Execute since if the current sdk version is at least versionCode, otherwise execute below

Version code comes from Build.VERSION_CODES.