Files
capod/app/src/main/java/eu/darken/cap/common/BuildWrap.kt
T
2021-12-28 17:11:50 +01:00

17 lines
357 B
Kotlin

package eu.darken.cap.common
import android.os.Build
// Can't be const because that prevents them from being mocked in tests
@Suppress("MayBeConstant")
object BuildWrap {
val VERSION = VersionWrap
object VersionWrap {
val SDK_INT = Build.VERSION.SDK_INT
}
}
fun hasApiLevel(level: Int): Boolean = BuildWrap.VERSION.SDK_INT >= level