mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
huawei: Make more tags optional for app managemnet
* solves this crash on Honmor GS Pro: 09:45:29.115 [Read Thread for HONOR Watch GS Pro-BD1] DEBUG n.f.g.s.b.BtBRQueue - Received 26 bytes: 5A0015002A068110820E0301260404000000030503322E302B86 09:45:29.118 [Read Thread for HONOR Watch GS Pro-BD1] DEBUG n.f.g.d.h.HuaweiTLV - Parsed TLV: {tag: 81 - Value: 820E0301260404000000030503322E30} 09:45:29.120 [Read Thread for HONOR Watch GS Pro-BD1] DEBUG n.f.g.s.d.h.ResponseManager - Service: 2a, command: 6, handled by: class nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.requests.GetAppInfoParams 09:45:29.122 [Read Thread for HONOR Watch GS Pro-BD1] DEBUG n.f.g.d.h.HuaweiTLV - Parsed TLV: {tag: 82 - Value: 0301260404000000030503322E30} 09:45:29.124 [Read Thread for HONOR Watch GS Pro-BD1] DEBUG n.f.g.d.h.HuaweiTLV - Parsed TLV: {tag: 3 - Value: 26} - {tag: 4 - Value: 00000003} - {tag: 5 - Value: 322E30} 09:45:29.126 [Read Thread for HONOR Watch GS Pro-BD1] ERROR n.f.g.s.d.h.r.Request - Parse TLV exception nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiPacket$MissingTagException: Missing tag: 6 at nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV.getBytes(HuaweiTLV.java:219) at nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV.getString(HuaweiTLV.java:239) at nodomain.freeyourgadget.gadgetbridge.devices.huawei.packets.App$AppInfoParams$Response.parseTlv(App.java:129) at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.requests.Request.handleResponse(Request.java:243) at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.ResponseManager.handleData(ResponseManager.java:131) at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiSupportProvider.onSocketRead(HuaweiSupportProvider.java:880) at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiBRSupport.onSocketRead(HuaweiBRSupport.java:74) at nodomain.freeyourgadget.gadgetbridge.service.btbr.BtBRQueue$1.run(BtBRQueue.java:87)
This commit is contained in:
parent
183bf8725f
commit
4e7b83bebf
@ -126,9 +126,12 @@ public class App {
|
||||
this.params.unknown1 = subTlv.getByte(0x03);
|
||||
this.params.unknown2 = subTlv.getInteger(0x04);
|
||||
this.params.osVersion = subTlv.getString(0x05);
|
||||
this.params.screenShape = subTlv.getString(0x06);
|
||||
this.params.width = subTlv.getShort(0x07);
|
||||
this.params.height = subTlv.getShort(0x08);
|
||||
if (subTlv.contains(0x06))
|
||||
this.params.screenShape = subTlv.getString(0x06);
|
||||
if (subTlv.contains(0x07))
|
||||
this.params.width = subTlv.getShort(0x07);
|
||||
if (subTlv.contains(0x08))
|
||||
this.params.height = subTlv.getShort(0x08);
|
||||
if (subTlv.contains(0x09))
|
||||
this.params.unknown3 = subTlv.getInteger(0x09);
|
||||
if(subTlv.contains(0x0a))
|
||||
|
Loading…
Reference in New Issue
Block a user