ktlintFormat

This commit is contained in:
Andrei Vereha 2021-05-02 10:38:22 +02:00
parent dd8ebded1a
commit 976ae45057
20 changed files with 95 additions and 86 deletions

View file

@ -132,8 +132,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in setNewBasalProfile", throwable) aapsLogger.error(LTag.PUMP, "Error in setNewBasalProfile", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).enacted(false).comment( source.onSuccess(
throwable.toString())) PumpEnactResult(injector).success(false).enacted(false).comment(
throwable.toString()
)
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("setNewBasalProfile completed") aapsLogger.debug("setNewBasalProfile completed")
@ -147,7 +150,6 @@ class OmnipodDashPumpPlugin @Inject constructor(
it == mapProfileToBasalProgram(profile) it == mapProfileToBasalProgram(profile)
} ?: true } ?: true
override fun lastDataTime(): Long { override fun lastDataTime(): Long {
return podStateManager.lastConnection return podStateManager.lastConnection
} }
@ -193,8 +195,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in deliverTreatment", throwable) aapsLogger.error(LTag.PUMP, "Error in deliverTreatment", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).enacted(false).comment( source.onSuccess(
throwable.toString())) PumpEnactResult(injector).success(false).enacted(false).comment(
throwable.toString()
)
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("deliverTreatment completed") aapsLogger.debug("deliverTreatment completed")
@ -250,8 +255,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in setTempBasalAbsolute", throwable) aapsLogger.error(LTag.PUMP, "Error in setTempBasalAbsolute", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).enacted(false).comment( source.onSuccess(
throwable.toString())) PumpEnactResult(injector).success(false).enacted(false).comment(
throwable.toString()
)
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("setTempBasalAbsolute completed") aapsLogger.debug("setTempBasalAbsolute completed")
@ -296,8 +304,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in cancelTempBasal", throwable) aapsLogger.error(LTag.PUMP, "Error in cancelTempBasal", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).enacted(false).comment( source.onSuccess(
throwable.toString())) PumpEnactResult(injector).success(false).enacted(false).comment(
throwable.toString()
)
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("cancelTempBasal completed") aapsLogger.debug("cancelTempBasal completed")
@ -408,8 +419,11 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in silenceAlerts", throwable) aapsLogger.error(LTag.PUMP, "Error in silenceAlerts", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).comment( source.onSuccess(
throwable.toString())) PumpEnactResult(injector).success(false).comment(
throwable.toString()
)
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("silenceAlerts completed") aapsLogger.debug("silenceAlerts completed")
@ -515,8 +529,10 @@ class OmnipodDashPumpPlugin @Inject constructor(
}, },
onError = { throwable -> onError = { throwable ->
aapsLogger.error(LTag.PUMP, "Error in playTestBeep", throwable) aapsLogger.error(LTag.PUMP, "Error in playTestBeep", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).enacted(false) source.onSuccess(
.comment(throwable.toString())) PumpEnactResult(injector).success(false).enacted(false)
.comment(throwable.toString())
)
}, },
onComplete = { onComplete = {
aapsLogger.debug("playTestBeep completed") aapsLogger.debug("playTestBeep completed")

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm
import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.extensions.toHex
import java.nio.ByteBuffer import java.nio.ByteBuffer
data class Id(val address: ByteArray) { data class Id(val address: ByteArray) {
init { init {
require(address.size == 4) require(address.size == 4)

View file

@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm
import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothManager import android.bluetooth.BluetoothManager
import android.content.Context import android.content.Context
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig
@ -15,7 +16,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEven
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.base.Command
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
import info.nightscout.androidaps.extensions.toHex
import io.reactivex.Observable import io.reactivex.Observable
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
import javax.inject.Inject import javax.inject.Inject

View file

@ -5,12 +5,12 @@ import android.bluetooth.BluetoothGattCallback
import android.bluetooth.BluetoothGattCharacteristic import android.bluetooth.BluetoothGattCharacteristic
import android.bluetooth.BluetoothGattDescriptor import android.bluetooth.BluetoothGattDescriptor
import android.bluetooth.BluetoothProfile import android.bluetooth.BluetoothProfile
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CharacteristicType.Companion.byValue import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CharacteristicType.Companion.byValue
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.DisconnectHandler import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session.DisconnectHandler
import info.nightscout.androidaps.extensions.toHex
import java.util.* import java.util.*
import java.util.concurrent.BlockingQueue import java.util.concurrent.BlockingQueue
import java.util.concurrent.CountDownLatch import java.util.concurrent.CountDownLatch

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket
import info.nightscout.androidaps.extensions.toHex
import org.spongycastle.crypto.engines.AESEngine import org.spongycastle.crypto.engines.AESEngine
import org.spongycastle.crypto.modes.CCMBlockCipher import org.spongycastle.crypto.modes.CCMBlockCipher
import org.spongycastle.crypto.params.AEADParameters import org.spongycastle.crypto.params.AEADParameters

View file

@ -5,13 +5,13 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io
import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGatt
import android.bluetooth.BluetoothGattCharacteristic import android.bluetooth.BluetoothGattCharacteristic
import android.bluetooth.BluetoothGattDescriptor import android.bluetooth.BluetoothGattDescriptor
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.BleCommCallbacks
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationError import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationError
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.callbacks.WriteConfirmationSuccess
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.* import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.*
import info.nightscout.androidaps.extensions.toHex
import java.util.concurrent.BlockingQueue import java.util.concurrent.BlockingQueue
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.* import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.command.*
@ -7,7 +8,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.*
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.BlePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.BlePacket
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadJoiner
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.packet.PayloadSplitter
import info.nightscout.androidaps.extensions.toHex
sealed class MessageSendResult sealed class MessageSendResult
object MessageSendSuccess : MessageSendResult() object MessageSendSuccess : MessageSendResult()

View file

@ -1,7 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import info.nightscout.androidaps.extensions.toHex import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import java.nio.ByteBuffer import java.nio.ByteBuffer
/*** /***

View file

@ -42,7 +42,7 @@ class PayloadJoiner(private val firstPacket: ByteArray) {
oneExtraPacket = lastPacket.oneExtraPacket oneExtraPacket = lastPacket.oneExtraPacket
} }
idx == fullFragments+1 && oneExtraPacket -> { idx == fullFragments + 1 && oneExtraPacket -> {
fragments.add(LastOptionalPlusOneBlePacket.parse(packet)) fragments.add(LastOptionalPlusOneBlePacket.parse(packet))
} }

View file

@ -1,12 +1,12 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator
import info.nightscout.androidaps.extensions.toHex
import org.spongycastle.crypto.engines.AESEngine import org.spongycastle.crypto.engines.AESEngine
import org.spongycastle.crypto.macs.CMac import org.spongycastle.crypto.macs.CMac
import org.spongycastle.crypto.params.KeyParameter import org.spongycastle.crypto.params.KeyParameter

View file

@ -1,21 +1,18 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair
import info.nightscout.androidaps.extensions.hexStringToByteArray
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.PairingException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.PairingException
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendErrorSending
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.StringLengthPrefixEncoding.Companion.parseKeys
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.RandomByteGenerator
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.X25519KeyGenerator
import info.nightscout.androidaps.extensions.hexStringToByteArray
import info.nightscout.androidaps.extensions.toHex
internal class LTKExchanger( internal class LTKExchanger(
private val aapsLogger: AAPSLogger, private val aapsLogger: AAPSLogger,
@ -35,7 +32,7 @@ internal class LTKExchanger(
keys = arrayOf(SP1, SP2), keys = arrayOf(SP1, SP2),
payloads = arrayOf(ids.podId.address, sp2()) payloads = arrayOf(ids.podId.address, sp2())
) )
throwOnSendError(sp1sp2.messagePacket, SP1+SP2) throwOnSendError(sp1sp2.messagePacket, SP1 + SP2)
seq++ seq++
val sps1 = PairMessage( val sps1 = PairMessage(
@ -67,7 +64,7 @@ internal class LTKExchanger(
seq++ seq++
// send SP0GP0 // send SP0GP0
val sp0gp0 = PairMessage ( val sp0gp0 = PairMessage(
sequenceNumber = seq, sequenceNumber = seq,
source = ids.myId, source = ids.myId,
destination = podAddress, destination = podAddress,
@ -76,7 +73,7 @@ internal class LTKExchanger(
) )
val result = msgIO.sendMessage(sp0gp0.messagePacket) val result = msgIO.sendMessage(sp0gp0.messagePacket)
if (result !is MessageSendSuccess) { if (result !is MessageSendSuccess) {
aapsLogger.warn(LTag.PUMPBTCOMM,"Error sending SP0GP0: $result") aapsLogger.warn(LTag.PUMPBTCOMM, "Error sending SP0GP0: $result")
} }
msgIO.receiveMessage() msgIO.receiveMessage()
@ -97,7 +94,6 @@ internal class LTKExchanger(
} }
} }
private fun processSps1FromPod(msg: MessagePacket) { private fun processSps1FromPod(msg: MessagePacket) {
aapsLogger.debug(LTag.PUMPBTCOMM, "Received SPS1 from pod: ${msg.payload.toHex()}") aapsLogger.debug(LTag.PUMPBTCOMM, "Received SPS1 from pod: ${msg.payload.toHex()}")

View file

@ -5,6 +5,7 @@ import android.bluetooth.BluetoothGatt
import android.bluetooth.BluetoothManager import android.bluetooth.BluetoothManager
import android.bluetooth.BluetoothProfile import android.bluetooth.BluetoothProfile
import android.content.Context import android.content.Context
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig import info.nightscout.androidaps.plugins.pump.omnipod.dash.BuildConfig
@ -19,7 +20,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.CmdBl
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataBleIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.DataBleIO
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.io.IncomingPackets
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO
import info.nightscout.androidaps.extensions.toHex
sealed class ConnectionState sealed class ConnectionState

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import info.nightscout.androidaps.extensions.toHex
import java.util.* import java.util.*
enum class EapAkaAttributeType(val type: Byte) { enum class EapAkaAttributeType(val type: Byte) {

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.MessageIOException
import info.nightscout.androidaps.extensions.toHex
import java.nio.ByteBuffer import java.nio.ByteBuffer
enum class EapCode(val code: Byte) { enum class EapCode(val code: Byte) {

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.extensions.toHex
import org.spongycastle.util.encoders.Hex import org.spongycastle.util.encoders.Hex
import java.security.SecureRandom import java.security.SecureRandom
import javax.crypto.Cipher import javax.crypto.Cipher

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.EnDecrypt import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.EnDecrypt
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotParseResponseException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotParseResponseException
@ -16,7 +16,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.b
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.AlarmStatusResponse
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.NakResponse import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.NakResponse
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.Response
import info.nightscout.androidaps.extensions.toHex
import kotlin.reflect.KClass import kotlin.reflect.KClass
sealed class CommandSendResult sealed class CommandSendResult

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
import info.nightscout.androidaps.extensions.toHex
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Ids
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.Nonce import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.endecrypt.Nonce
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.SessionEstablishmentException import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.SessionEstablishmentException
@ -10,7 +10,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageSendSuccess
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType
import info.nightscout.androidaps.extensions.toHex
import java.security.SecureRandom import java.security.SecureRandom
import java.util.* import java.util.*

View file

@ -6,6 +6,7 @@ import android.os.Bundle
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.activities.ErrorHelperActivity import info.nightscout.androidaps.activities.ErrorHelperActivity
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import info.nightscout.androidaps.extensions.toVisibility
import info.nightscout.androidaps.interfaces.CommandQueueProvider import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep
@ -20,7 +21,6 @@ import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.queue.events.EventQueueChanged
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.extensions.toVisibility
import info.nightscout.androidaps.utils.rx.AapsSchedulers import info.nightscout.androidaps.utils.rx.AapsSchedulers
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign