1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-24 10:56:50 +01:00

Xiaomi Spp: Fix logging of unhandled packets

This commit is contained in:
José Rebelo 2024-06-30 09:11:45 +01:00
parent 16018879ba
commit f2d935bfc1

View File

@ -272,15 +272,12 @@ public class XiaomiSppSupport extends XiaomiConnectionSupport {
payload = mXiaomiSupport.getAuthService().decrypt(payload);
}
int channel = packet.getChannel();
if (mChannelHandlers.containsKey(channel)) {
XiaomiChannelHandler handler = mChannelHandlers.get(channel);
if (handler != null)
handler.handle(payload);
final XiaomiChannelHandler handler = mChannelHandlers.get(packet.getChannel());
if (handler != null) {
handler.handle(payload);
} else {
LOG.warn("Unhandled SppPacket on channel {}", packet.getChannel());
}
LOG.warn("Unhandled SppPacket on channel {}", packet.getChannel());
}
@Override