mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
17 lines
357 B
Kotlin
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
|