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

Fix support classes for some Amazfit devices

Affected devices:
- Amazfit Bip Lite
- Amazfit Bip S Lite
- Amazfit GTS 2 Mini
- Amazfit Pop
- Amazfit Pop Pro
This commit is contained in:
José Rebelo 2023-09-14 22:05:27 +01:00
parent c647c2647f
commit 763ee10a6c
5 changed files with 38 additions and 0 deletions

View File

@ -31,6 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipLiteSupport;
public class AmazfitBipLiteCoordinator extends AmazfitBipCoordinator { public class AmazfitBipLiteCoordinator extends AmazfitBipCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipLiteCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipLiteCoordinator.class);
@ -89,4 +91,10 @@ public class AmazfitBipLiteCoordinator extends AmazfitBipCoordinator {
R.xml.devicesettings_transliteration R.xml.devicesettings_transliteration
}; };
} }
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass() {
return AmazfitBipLiteSupport.class;
}
} }

View File

@ -29,6 +29,8 @@ import org.slf4j.LoggerFactory;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler; import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSLiteSupport;
public class AmazfitBipSLiteCoordinator extends AmazfitBipSCoordinator { public class AmazfitBipSLiteCoordinator extends AmazfitBipSCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipSLiteCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipSLiteCoordinator.class);
@ -58,4 +60,10 @@ public class AmazfitBipSLiteCoordinator extends AmazfitBipSCoordinator {
AmazfitBipSLiteFWInstallHandler handler = new AmazfitBipSLiteFWInstallHandler(uri, context); AmazfitBipSLiteFWInstallHandler handler = new AmazfitBipSLiteFWInstallHandler(uri, context);
return handler.isValid() ? handler : null; return handler.isValid() ? handler : null;
} }
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass() {
return AmazfitBipSLiteSupport.class;
}
} }

View File

@ -31,6 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2MiniSupport;
public class AmazfitGTS2MiniCoordinator extends AmazfitGTS2Coordinator { public class AmazfitGTS2MiniCoordinator extends AmazfitGTS2Coordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS2MiniCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS2MiniCoordinator.class);
@ -83,4 +85,10 @@ public class AmazfitGTS2MiniCoordinator extends AmazfitGTS2Coordinator {
R.xml.devicesettings_transliteration R.xml.devicesettings_transliteration
}; };
} }
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass() {
return AmazfitGTS2MiniSupport.class;
}
} }

View File

@ -29,6 +29,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbipu.AmazfitBipUCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbipu.AmazfitBipUCoordinator;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitpop.AmazfitPopSupport;
public class AmazfitPopCoordinator extends AmazfitBipUCoordinator { public class AmazfitPopCoordinator extends AmazfitBipUCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitPopCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(AmazfitPopCoordinator.class);
@ -59,4 +61,9 @@ public class AmazfitPopCoordinator extends AmazfitBipUCoordinator {
return handler.isValid() ? handler : null; return handler.isValid() ? handler : null;
} }
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass() {
return AmazfitPopSupport.class;
}
} }

View File

@ -29,6 +29,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbipupro.AmazfitBipUProCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbipupro.AmazfitBipUProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitpoppro.AmazfitPopProSupport;
public class AmazfitPopProCoordinator extends AmazfitBipUProCoordinator { public class AmazfitPopProCoordinator extends AmazfitBipUProCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitPopProCoordinator.class); private static final Logger LOG = LoggerFactory.getLogger(AmazfitPopProCoordinator.class);
@ -59,4 +61,9 @@ public class AmazfitPopProCoordinator extends AmazfitBipUProCoordinator {
return handler.isValid() ? handler : null; return handler.isValid() ? handler : null;
} }
@NonNull
@Override
public Class<? extends DeviceSupport> getDeviceSupportClass() {
return AmazfitPopProSupport.class;
}
} }