1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

Amazfit GTR2e: fix creating from firmware info class

This commit is contained in:
Andreas Shimokawa 2021-02-02 23:12:12 +01:00
parent b945af1531
commit 6ca3424035

View File

@ -23,7 +23,7 @@ import android.net.Uri;
import java.io.IOException; import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper; import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRFirmwareInfo; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2e.AmazfitGTR2eFirmwareInfo;
public class AmazfitGTR2eFWHelper extends HuamiFWHelper { public class AmazfitGTR2eFWHelper extends HuamiFWHelper {
@ -33,7 +33,7 @@ public class AmazfitGTR2eFWHelper extends HuamiFWHelper {
@Override @Override
protected void determineFirmwareInfo(byte[] wholeFirmwareBytes) { protected void determineFirmwareInfo(byte[] wholeFirmwareBytes) {
firmwareInfo = new AmazfitGTRFirmwareInfo(wholeFirmwareBytes); firmwareInfo = new AmazfitGTR2eFirmwareInfo(wholeFirmwareBytes);
if (!firmwareInfo.isHeaderValid()) { if (!firmwareInfo.isHeaderValid()) {
throw new IllegalArgumentException("Not an Amazfit GTR 2e firmware"); throw new IllegalArgumentException("Not an Amazfit GTR 2e firmware");
} }