Wear log replace bytearray data by size

This commit is contained in:
Philoul 2023-10-29 18:24:36 +01:00
parent 4b8c48b424
commit 7b04f79c7b
2 changed files with 6 additions and 6 deletions

View file

@ -143,7 +143,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() {
}
rxDataPath -> {
aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${String(messageEvent.data)}")
aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${messageEvent.data.size}")
val command = EventData.deserializeByte(messageEvent.data)
rxBus.send(command.also { it.sourceNodeId = messageEvent.sourceNodeId })
}
@ -213,13 +213,13 @@ class DataLayerListenerServiceMobile : WearableListenerService() {
}
private fun sendMessage(path: String, data: ByteArray) {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}")
transcriptionNodeId?.also { nodeId ->
messageClient
.sendMessage(nodeId, path, data).apply {
addOnSuccessListener { }
addOnFailureListener {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}")
}
}
}

View file

@ -206,15 +206,15 @@ class DataLayerListenerServiceWear : WearableListenerService() {
} ?: aapsLogger.debug(LTag.WEAR, "sendMessage: Ignoring message. No node selected.")
}
@Suppress("unused")
private fun sendMessage(path: String, data: ByteArray) {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}")
transcriptionNodeId?.also { nodeId ->
messageClient
.sendMessage(nodeId, path, data).apply {
addOnSuccessListener { }
addOnFailureListener {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}")
}
}
}