1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Amazfit Bip: try to detect the font type not by the size

This could help modders
This commit is contained in:
Andreas Shimokawa 2018-01-30 23:28:49 +01:00
parent 95cc538575
commit 5973f189eb

View File

@ -140,11 +140,12 @@ public class AmazfitBipFirmwareInfo extends HuamiFirmwareInfo {
return HuamiFirmwareType.WATCHFACE;
}
if (ArrayUtils.startsWith(bytes, NEWFT_HEADER)) {
if (bytes.length > 800000) {
if (bytes[10] == 0x01) {
return HuamiFirmwareType.FONT;
}
} else if (bytes[10] == 0x02) {
return HuamiFirmwareType.FONT_LATIN;
}
}
return HuamiFirmwareType.INVALID;
}