Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 21 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '5.3.15' propVersionName = '5.3.16' kotlin_version = '1.3.10' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Int.kt +7 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,13 @@ fun Int.getFormattedDuration(): String { return sb.toString() } fun Int.addBitIf(add: Boolean, bit: Int) = if (add) { addBit(bit) } else { removeBit(bit) } // TODO: how to do "bits & ~bit" in kotlin? fun Int.removeBit(bit: Int) = addBit(bit) - bit Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 21 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '5.3.15' propVersionName = '5.3.16' kotlin_version = '1.3.10' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Int.kt +7 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,13 @@ fun Int.getFormattedDuration(): String { return sb.toString() } fun Int.addBitIf(add: Boolean, bit: Int) = if (add) { addBit(bit) } else { removeBit(bit) } // TODO: how to do "bits & ~bit" in kotlin? fun Int.removeBit(bit: Int) = addBit(bit) - bit Loading