Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Aug 24, 2023
1 parent edf15ba commit dd6c70b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ class PairOnNetworkLongImReadCommand(
setFailure("read failure")
}

// kotlin-detect complains that bytearray as a magic number, but we cannot define bytearray
// as a well named constant and const can only support with primitive and string.
@Suppress("MagicNumber")
fun checkLocalConfigDisableAttributeTlv(attribute: AttributeState): Boolean =
attribute.getTlv().contentEquals(byteArrayOf(0x28, 0x10))

fun checkLocalConfigDisableAttributeJson(attribute: AttributeState): Boolean =
attribute.getJson().toString() == """{"16:BOOL":false}"""

// kotlin-detect complains that bytearray as a magic number, but we cannot define bytearray
// as a well named constant and const can only support with primitive and string.
@Suppress("MagicNumber")
fun checkStartUpEventTlv(event: EventState): Boolean =
event.getTlv().contentEquals(byteArrayOf(0x35, 0x0, 0x24, 0x0, 0x1, 0x18))
Expand Down

0 comments on commit dd6c70b

Please sign in to comment.