mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-10 08:56:49 +01:00
Huawei: Little cleanups in P2P service
This commit is contained in:
parent
ed49f6d323
commit
609a673dae
@ -487,6 +487,5 @@ public class HuaweiP2PCalendarService extends HuaweiBaseP2PService {
|
|||||||
} catch (HuaweiPacket.MissingTagException e) {
|
} catch (HuaweiPacket.MissingTagException e) {
|
||||||
LOG.error("P2P handle packet: tag is missing");
|
LOG.error("P2P handle packet: tag is missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,8 +274,6 @@ public class HuaweiP2PDataDictionarySyncService extends HuaweiBaseP2PService {
|
|||||||
for (HuaweiTLV l1 : l.getObjects(0x87)) {
|
for (HuaweiTLV l1 : l.getObjects(0x87)) {
|
||||||
for (HuaweiTLV ll : l1.getObjects(0x88)) {
|
for (HuaweiTLV ll : l1.getObjects(0x88)) {
|
||||||
int type = ll.getInteger(0x9);
|
int type = ll.getInteger(0x9);
|
||||||
// 10 - Double - data
|
|
||||||
// 11 - String - metadata
|
|
||||||
if (ll.contains(0xa))
|
if (ll.contains(0xa))
|
||||||
dataValues.add(new DictData.DictDataValue(type, (byte) 0xa, ll.getBytes(0xa)));
|
dataValues.add(new DictData.DictDataValue(type, (byte) 0xa, ll.getBytes(0xa)));
|
||||||
if (ll.contains(0xb))
|
if (ll.contains(0xb))
|
||||||
|
@ -75,7 +75,7 @@ public class HuaweiP2PTrackService extends HuaweiBaseP2PService {
|
|||||||
header.putInt(counter.getNext()); // message id
|
header.putInt(counter.getNext()); // message id
|
||||||
header.flip();
|
header.flip();
|
||||||
|
|
||||||
ByteBuffer packet = ByteBuffer.allocate(36 + data.length);
|
ByteBuffer packet = ByteBuffer.allocate(HEADER_LENGTH + data.length);
|
||||||
packet.put(header.array());
|
packet.put(header.array());
|
||||||
packet.put(data);
|
packet.put(data);
|
||||||
packet.flip();
|
packet.flip();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user