Address review comments:
- move think dependency to core_dependencies and make it's version configurable: https://github.com/0pen-dash/AndroidAPS/pull/10#discussion_r584329468 - add message string to exceptions. Renames
This commit is contained in:
parent
b1f099c506
commit
57c2d2d9a1
6 changed files with 8 additions and 6 deletions
|
@ -23,6 +23,7 @@ buildscript {
|
|||
commonscodec_version = '1.15'
|
||||
jodatime_version = '2.10.10'
|
||||
work_version = '2.5.0'
|
||||
tink_version = '1.5.0'
|
||||
|
||||
junit_version = '4.13.2'
|
||||
mockitoVersion = '3.7.7'
|
||||
|
|
|
@ -46,7 +46,7 @@ dependencies {
|
|||
|
||||
//CryptoUtil
|
||||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
||||
|
||||
api "com.google.crypto.tink:tink-android:$tink_version"
|
||||
|
||||
// Graphview cannot be upgraded
|
||||
api "com.jjoe64:graphview:4.0.1"
|
||||
|
|
|
@ -22,5 +22,4 @@ dependencies {
|
|||
implementation "androidx.room:room-rxjava2:$room_version"
|
||||
kapt "androidx.room:room-compiler:$room_version"
|
||||
implementation 'com.github.guepardoapps:kulid:1.1.2.0'
|
||||
implementation 'com.google.crypto.tink:tink-android:1.5.0'
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.excepti
|
|||
|
||||
class MessageIOException : Exception {
|
||||
constructor(msg: String) : super(msg)
|
||||
constructor(cause: Throwable) : super(cause)
|
||||
constructor(cause: Throwable) : super("Caught Exception during Message I/O", cause)
|
||||
}
|
|
@ -2,5 +2,5 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message
|
|||
|
||||
import info.nightscout.androidaps.utils.extensions.toHex
|
||||
|
||||
class CrcMismatchException(val expected: Long, val got: Long, val payload: ByteArray) :
|
||||
Exception("CRC missmatch. Got: ${got}. Expected: ${expected}. Payload: ${payload.toHex()}")
|
||||
class CrcMismatchException(val expected: Long, val actual: Long, val payload: ByteArray) :
|
||||
Exception("CRC mismatch. Actual: ${actual}. Expected: ${expected}. Payload: ${payload.toHex()}")
|
|
@ -1,7 +1,9 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.pair
|
||||
|
||||
import info.nightscout.androidaps.utils.extensions.toHex
|
||||
|
||||
data class PairResult(val ltk: ByteArray) {
|
||||
init {
|
||||
require(ltk.size == 16)
|
||||
require(ltk.size == 16) {"LTK length must be 16 bytes. Received LTK: ${ltk.toHex()}"}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue