aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/PackageUtils.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/PackageUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/PackageUtils.kt
index 0bd534e..d8524fa 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/PackageUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/PackageUtils.kt
@@ -22,6 +22,7 @@ import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.provider.Settings
+import androidx.annotation.ChecksSdkIntAtLeast
/**
* Created by Allan Wang on 2017-06-23.
@@ -67,14 +68,21 @@ fun Context.showAppInfo(packageName: String) {
}
inline val buildIsMarshmallowAndUp: Boolean
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.M)
get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
inline val buildIsLollipopAndUp: Boolean
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.LOLLIPOP)
get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
inline val buildIsNougatAndUp: Boolean
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.N)
get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
+inline val buildIsOreoAndUp: Boolean
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.O)
+ get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
+
const val INSTALLER_GOOGLE_PLAY_VENDING = "com.android.vending"
const val INSTALLER_GOOGLE_PLAY_FEEDBACK = "com.google.android.feedback"