mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Huami 2021: Prevent duplicated payload logging
This commit is contained in:
parent
ed3ce6fa9d
commit
eb7366c7e3
@ -106,7 +106,6 @@ public class Huami2021ChunkedDecoder {
|
||||
try {
|
||||
buf = CryptoUtils.decryptAES(buf, messagekey);
|
||||
buf = ArrayUtils.subarray(buf, 0, currentLength);
|
||||
LOG.debug("decrypted data {}: {}", String.format("0x%04x", currentType), GB.hexdump(buf));
|
||||
} catch (Exception e) {
|
||||
LOG.warn("error decrypting " + e);
|
||||
currentHandle = null;
|
||||
@ -114,6 +113,13 @@ public class Huami2021ChunkedDecoder {
|
||||
return;
|
||||
}
|
||||
}
|
||||
LOG.debug(
|
||||
"{} data {}: {}",
|
||||
encrypted ? "Decrypted" : "Plaintext",
|
||||
String.format("0x%04x", currentType),
|
||||
GB.hexdump(buf)
|
||||
);
|
||||
|
||||
try {
|
||||
huami2021Handler.handle2021Payload((short) currentType, buf);
|
||||
} catch (final Exception e) {
|
||||
|
@ -1195,8 +1195,6 @@ public abstract class Huami2021Support extends HuamiSupport {
|
||||
return;
|
||||
}
|
||||
|
||||
LOG.debug("Got 2021 payload for {}: {}", String.format("0x%04x", type), GB.hexdump(payload));
|
||||
|
||||
if (mServiceMap.containsKey(type)) {
|
||||
mServiceMap.get(type).handlePayload(payload);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user