1
0
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:
Me7c7 2024-12-01 17:57:27 +02:00
parent ed49f6d323
commit 609a673dae
3 changed files with 2 additions and 5 deletions

View File

@ -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");
} }
} }
} }

View File

@ -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))

View File

@ -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();