kotlin lints
This commit is contained in:
parent
6b4ee247b3
commit
c6595e0a2a
|
@ -6,6 +6,7 @@ import info.nightscout.rx.logging.AAPSLogger
|
|||
import info.nightscout.rx.logging.LTag
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
@Suppress("unused")
|
||||
enum class EapCode(val code: Byte) {
|
||||
REQUEST(1),
|
||||
RESPONSE(2),
|
||||
|
@ -20,7 +21,7 @@ enum class EapCode(val code: Byte) {
|
|||
}
|
||||
}
|
||||
|
||||
data class EapMessage(
|
||||
class EapMessage(
|
||||
val code: EapCode,
|
||||
val identifier: Byte,
|
||||
val subType: Byte = 0,
|
||||
|
@ -38,7 +39,7 @@ data class EapMessage(
|
|||
}
|
||||
val totalSize = HEADER_SIZE + attrSize
|
||||
|
||||
var bb = ByteBuffer
|
||||
val bb = ByteBuffer
|
||||
.allocate(totalSize)
|
||||
.put(code.code)
|
||||
.put(identifier)
|
||||
|
@ -57,7 +58,7 @@ data class EapMessage(
|
|||
|
||||
private const val HEADER_SIZE = 8
|
||||
private const val SUBTYPE_AKA_CHALLENGE = 1.toByte()
|
||||
const val SUBTYPE_SYNCRONIZATION_FAILURE = 4.toByte()
|
||||
const val SUBTYPE_SYNCHRONIZATION_FAILURE = 4.toByte()
|
||||
|
||||
private const val AKA_PACKET_TYPE = 0x17.toByte()
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class SessionEstablisher(
|
|||
}
|
||||
|
||||
private fun isResynchronization(eapMsg: EapMessage): EapSqn? {
|
||||
if (eapMsg.subType != EapMessage.SUBTYPE_SYNCRONIZATION_FAILURE ||
|
||||
if (eapMsg.subType != EapMessage.SUBTYPE_SYNCHRONIZATION_FAILURE ||
|
||||
eapMsg.attributes.size != 1 ||
|
||||
eapMsg.attributes[0] !is EapAkaAttributeAuts
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue