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

Huawei: Optional tag for watchface params

Related to this crash on Huawei Watch GT:

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.Watchface$WatchfaceParams$Response.parseTlv(Watchface.java:125)
	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.onCharacteristicChanged(HuaweiSupportProvider.java:875)
	at nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiLESupport.onCharacteristicChanged(HuaweiLESupport.java:80)
	at nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue$InternalGattCallback.onCharacteristicChanged(BtLEQueue.java:679)
	at android.bluetooth.BluetoothGattCallback.onCharacteristicChanged(BluetoothGattCallback.java:194)
	at android.bluetooth.BluetoothGatt$1$8.run(BluetoothGatt.java:581)
	at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:948)
	at android.bluetooth.BluetoothGatt.-$$Nest$mrunOrQueueCallback(Unknown Source:0)
	at android.bluetooth.BluetoothGatt$1.onNotify(BluetoothGatt.java:575)
	at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:329)
	at android.os.Binder.execTransactInternal(Binder.java:1299)
	at android.os.Binder.execTransact(Binder.java:1253)
This commit is contained in:
Me7c7 2024-09-13 10:05:38 +03:00
parent 4e7b83bebf
commit e469ecd463

View File

@ -122,6 +122,7 @@ public class Watchface {
this.params.height = this.tlv.getShort(0x03);
this.params.supportFileType = this.tlv.getByte(0x04);
this.params.sort = this.tlv.getByte(0x05);
if (this.tlv.contains(0x06))
this.params.otherWatchfaceVersions = this.tlv.getString(0x06);
}
}