fix warnings

This commit is contained in:
Andrei Vereha 2021-10-02 10:29:00 +02:00
parent a7f82eb4fb
commit 45c02b9b1e
3 changed files with 3 additions and 6 deletions

View file

@ -180,7 +180,6 @@ class OmnipodDashBleManagerImpl @Inject constructor(
?: throw FailedToConnectException("connection lost")
}
@kotlin.ExperimentalStdlibApi
override fun pairNewPod(): Observable<PodEvent> = Observable.create { emitter ->
if (!busy.compareAndSet(false, true)) {
throw BusyException()

View file

@ -23,7 +23,6 @@ internal class LTKExchanger(
private val keyExchange = KeyExchange(aapsLogger, X25519KeyGenerator(), RandomByteGenerator())
private var seq: Byte = 1
@kotlin.ExperimentalStdlibApi
@Throws(PairingException::class)
fun negotiateLTK(): PairResult {
val sp1sp2 = PairMessage(
@ -114,7 +113,6 @@ internal class LTKExchanger(
keyExchange.validatePodConf(payload)
}
@kotlin.ExperimentalStdlibApi
private fun sp2(): ByteArray {
// This is GetPodStatus command, with page 0 parameter.
// We could replace that in the future with the serialized GetPodStatus()

View file

@ -17,13 +17,13 @@ class AlertConfiguration(
get() {
var firstByte = (type.index.toInt() shl 4).toByte()
if (enabled) {
firstByte = firstByte or (1 shl 3)
firstByte = (firstByte.toInt() or (1 shl 3)).toByte()
}
if (trigger is AlertTrigger.ReservoirVolumeTrigger) {
firstByte = firstByte or (1 shl 2)
firstByte = (firstByte.toInt() or (1 shl 2)).toByte()
}
if (autoOff) {
firstByte = firstByte or (1 shl 1)
firstByte = (firstByte.toInt() or (1 shl 1)).toByte()
}
firstByte = firstByte or ((durationInMinutes.toInt() shr 8 and 0x01).toByte())
return ByteBuffer.allocate(6)