We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b926a0 commit 83111aaCopy full SHA for 83111aa
1 file changed
app/src/main/java/net/imknown/android/forefrontinfo/ui/common/AndroidVersionExt.kt
@@ -67,15 +67,13 @@ private val sdkIntFull: Int by lazy {
67
}
68
69
70
-/** E.g.: "36.1" */
+/** E.g.: "35", "36.1" */
71
val sdkFull: String by lazy {
72
- "$sdkInt.${sdkIntFull.toMinor()}"
73
-}
74
-
75
-private fun Int.toMinor(): Int = if (isAtLeastAndroid16()) {
76
- Build.getMinorSdkVersion(this)
77
-} else {
78
- this % SDK_INT_MULTIPLIER
+ if (isAtLeastAndroid16()) {
+ "$sdkInt.${Build.getMinorSdkVersion(sdkIntFull)}"
+ } else {
+ sdkInt.toString()
+ }
79
80
81
fun isAtLeastAndroid6() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M || sdkInt >= Build.VERSION_CODES.M
0 commit comments