mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 19:45:50 +01:00
Core: replaced device initialization logic with class based decision
Core: cleaned up imports Device management: try single-argument-constructor first Device management: fixed wrong device support class Device management: added missing initial flags for Mi band 2 HRX Device management: removed unused import Device management: removed unused import Device management: improved exception handling Device management: prevent constructors from being optimized out Device management: added UnknownDeviceSupport
This commit is contained in:
parent
d273e6652b
commit
e36bd2eae7
6
app/proguard-rules.pro
vendored
6
app/proguard-rules.pro
vendored
@ -26,6 +26,12 @@
|
||||
-keepclassmembers class nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic {
|
||||
public static *;
|
||||
}
|
||||
# Keep constructors for support classes, as they're called by reflection in DeviceSupportFactory#createServiceDeviceSupport
|
||||
-keep public class * extends nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport
|
||||
-keepclassmembers class * extends nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport {
|
||||
public <init>(nodomain.freeyourgadget.gadgetbridge.model.DeviceType);
|
||||
public <init>();
|
||||
}
|
||||
-keepattributes JavascriptInterface
|
||||
|
||||
# https://github.com/tony19/logback-android/issues/29
|
||||
|
@ -35,6 +35,7 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import de.greenrobot.dao.query.QueryBuilder;
|
||||
@ -61,6 +62,8 @@ import nodomain.freeyourgadget.gadgetbridge.model.PaiSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.SleepRespiratoryRateSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Spo2Sample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.StressSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.GBApplication.getPrefs;
|
||||
@ -459,4 +462,9 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
public boolean supportsNavigation() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import android.net.Uri;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -46,6 +47,8 @@ import nodomain.freeyourgadget.gadgetbridge.model.PaiSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.SleepRespiratoryRateSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Spo2Sample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.StressSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
|
||||
/**
|
||||
* This interface is implemented at least once for every supported gadget device.
|
||||
@ -555,4 +558,9 @@ public interface DeviceCoordinator {
|
||||
List<HeartRateCapability.MeasurementInterval> getHeartRateMeasurementIntervals();
|
||||
|
||||
boolean supportsNavigation();
|
||||
|
||||
@NonNull
|
||||
Class<? extends DeviceSupport> getDeviceSupportClass();
|
||||
|
||||
EnumSet<ServiceDeviceSupport.Flags> getInitialFlags();
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.unknown.UnknownDeviceSupport;
|
||||
|
||||
public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
private final UnknownSampleProvider sampleProvider;
|
||||
@ -210,4 +212,10 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
public int[] getColorPresets() {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return UnknownDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.asteroidos.AsteroidOSDeviceSupport;
|
||||
|
||||
public class AsteroidOSDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
@ -156,4 +157,10 @@ public class AsteroidOSDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
public boolean supportsMusicInfo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AsteroidOSDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.banglejs.BangleJSDeviceSupport;
|
||||
|
||||
public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -225,4 +227,10 @@ public class BangleJSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public boolean supportsNavigation() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return BangleJSDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.binary_sensor.BinarySensorSupport;
|
||||
|
||||
public class BinarySensorCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@ -150,6 +151,12 @@ public class BinarySensorCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return BinarySensorSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_NONE;
|
||||
|
@ -38,6 +38,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gb6900.CasioGB6900DeviceSupport;
|
||||
|
||||
public class CasioGB6900DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(CasioGB6900DeviceCoordinator.class);
|
||||
@ -153,4 +155,10 @@ public class CasioGB6900DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return CasioGB6900DeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gbx100.CasioGBX100DeviceSupport;
|
||||
|
||||
public class CasioGBX100DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(CasioGBX100DeviceCoordinator.class);
|
||||
@ -167,4 +169,10 @@ public class CasioGBX100DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return CasioGBX100DeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,8 @@ import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.casio.CasioConstants;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.casio.CasioDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gwb5600.CasioGWB5600DeviceSupport;
|
||||
|
||||
public class CasioGWB5600DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
|
||||
@ -96,6 +98,12 @@ public class CasioGWB5600DeviceCoordinator extends CasioDeviceCoordinator {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return CasioGWB5600DeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
|
@ -23,6 +23,8 @@ import android.net.Uri;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractBLEDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
||||
@ -32,6 +34,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.domyos.DomyosT540Support;
|
||||
|
||||
public class DomyosT540Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -129,6 +134,17 @@ public class DomyosT540Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return DomyosT540Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@ -29,6 +29,8 @@ import androidx.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import de.greenrobot.dao.query.QueryBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
@ -42,6 +44,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.fitpro.FitProDeviceSupport;
|
||||
|
||||
public class FitProDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FitProDeviceCoordinator.class);
|
||||
@ -188,4 +193,15 @@ public class FitProDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return FitProDeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.flipper.zero.support.FlipperZeroSupport;
|
||||
|
||||
public class FlipperZeroCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Override
|
||||
@ -111,6 +113,12 @@ public class FlipperZeroCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return FlipperZeroSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_NONE;
|
||||
|
@ -15,6 +15,8 @@ import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.galaxy_buds.GalaxyBudsDeviceSupport;
|
||||
|
||||
public abstract class GalaxyBudsGenericCoordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
|
||||
@ -111,4 +113,9 @@ public abstract class GalaxyBudsGenericCoordinator extends AbstractBLClassicDevi
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return GalaxyBudsDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityUser;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.hplus.HPlusSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
@ -328,5 +331,10 @@ public class HPlusCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return HPlusSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband5.AmazfitBand5Support;
|
||||
|
||||
public class AmazfitBand5Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBand5Coordinator.class);
|
||||
@ -160,6 +162,12 @@ public class AmazfitBand5Coordinator extends HuamiCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBand5Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband7.AmazfitBand7Support;
|
||||
|
||||
public class AmazfitBand7Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBand7Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitBand7Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITBAND7;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBand7Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitBand7FWInstallHandler(uri, context);
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipSupport;
|
||||
|
||||
public class AmazfitBipCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipCoordinator.class);
|
||||
@ -99,4 +101,10 @@ public class AmazfitBipCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBipSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip3pro.AmazfitBip3ProSupport;
|
||||
|
||||
public class AmazfitBip3ProCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBip3ProCoordinator.class);
|
||||
@ -166,4 +168,10 @@ public class AmazfitBip3ProCoordinator extends HuamiCoordinator {
|
||||
"zh_TW",
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBip3ProSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip5.AmazfitBip5Support;
|
||||
|
||||
public class AmazfitBip5Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBip5Coordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitBip5Coordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBip5Support.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSSupport;
|
||||
|
||||
public class AmazfitBipSCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipSCoordinator.class);
|
||||
@ -116,6 +118,12 @@ public class AmazfitBipSCoordinator extends HuamiCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBipSSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
|
@ -33,6 +33,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipu.AmazfitBipUSupport;
|
||||
|
||||
public class AmazfitBipUCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipUCoordinator.class);
|
||||
@ -164,6 +166,12 @@ public class AmazfitBipUCoordinator extends HuamiCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBipUSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
|
@ -33,6 +33,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipupro.AmazfitBipUProSupport;
|
||||
|
||||
public class AmazfitBipUProCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBipUProCoordinator.class);
|
||||
@ -155,6 +157,12 @@ public class AmazfitBipUProCoordinator extends HuamiCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitBipUProSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahpro.AmazfitCheetahProSupport;
|
||||
|
||||
public class AmazfitCheetahProCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahProCoordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitCheetahProCoordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITCHEETAHPRO;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitCheetahProSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitCheetahProFWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahround.AmazfitCheetahRoundSupport;
|
||||
|
||||
public class AmazfitCheetahRoundCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahRoundCoordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitCheetahRoundCoordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitCheetahRoundSupport.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareSupport;
|
||||
|
||||
public class AmazfitCheetahSquareCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahSquareCoordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitCheetahSquareCoordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitCheetahSquareSupport.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor.AmazfitCorSupport;
|
||||
|
||||
public class AmazfitCorCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCorCoordinator.class);
|
||||
@ -107,4 +109,10 @@ public class AmazfitCorCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitCorSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor2.AmazfitCor2Support;
|
||||
|
||||
public class AmazfitCor2Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCor2Coordinator.class);
|
||||
@ -109,4 +111,10 @@ public class AmazfitCor2Coordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitCor2Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitfalcon.AmazfitFalconSupport;
|
||||
|
||||
public class AmazfitFalconCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitFalconCoordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitFalconCoordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitFalconSupport.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRSupport;
|
||||
|
||||
public class AmazfitGTRCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRCoordinator.class);
|
||||
@ -109,4 +111,10 @@ public class AmazfitGTRCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTRSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRLiteSupport;
|
||||
|
||||
public class AmazfitGTRLiteCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRLiteCoordinator.class);
|
||||
@ -107,4 +109,10 @@ public class AmazfitGTRLiteCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTRLiteSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2Support;
|
||||
|
||||
public class AmazfitGTR2Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR2Coordinator.class);
|
||||
@ -114,4 +116,10 @@ public class AmazfitGTR2Coordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTR2Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2eSupport;
|
||||
|
||||
public class AmazfitGTR2eCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR2eCoordinator.class);
|
||||
@ -114,4 +116,10 @@ public class AmazfitGTR2eCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTR2eSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3.AmazfitGTR3Support;
|
||||
|
||||
public class AmazfitGTR3Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTR3Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTR3;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTR3Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTR3FWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3pro.AmazfitGTR3ProSupport;
|
||||
|
||||
public class AmazfitGTR3ProCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProCoordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTR3ProCoordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTR3PRO;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTR3ProSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTR3ProFWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr4.AmazfitGTR4Support;
|
||||
|
||||
public class AmazfitGTR4Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR4Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTR4Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTR4;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTR4Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTR4FWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtrmini.AmazfitGTRMiniSupport;
|
||||
|
||||
public class AmazfitGTRMiniCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRMiniCoordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitGTRMiniCoordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTRMiniSupport.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -31,6 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts.AmazfitGTSSupport;
|
||||
|
||||
public class AmazfitGTSCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTSCoordinator.class);
|
||||
@ -108,4 +110,10 @@ public class AmazfitGTSCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTSSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2Support;
|
||||
|
||||
public class AmazfitGTS2Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS2Coordinator.class);
|
||||
@ -114,4 +116,10 @@ public class AmazfitGTS2Coordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTS2Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2eSupport;
|
||||
|
||||
public class AmazfitGTS2eCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS2eCoordinator.class);
|
||||
@ -114,4 +116,10 @@ public class AmazfitGTS2eCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTS2eSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts3.AmazfitGTS3Support;
|
||||
|
||||
public class AmazfitGTS3Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTS3Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTS3;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTS3Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTS3FWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4.AmazfitGTS4Support;
|
||||
|
||||
public class AmazfitGTS4Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTS4Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTS4;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTS4Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTS4FWInstallHandler(uri, context);
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4mini.AmazfitGTS4MiniSupport;
|
||||
|
||||
public class AmazfitGTS4MiniCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4MiniCoordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitGTS4MiniCoordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITGTS4MINI;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitGTS4MiniSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitGTS4MiniFWInstallHandler(uri, context);
|
||||
|
@ -36,6 +36,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitneo.AmazfitNeoSupport;
|
||||
|
||||
public class AmazfitNeoCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitNeoCoordinator.class);
|
||||
@ -134,4 +136,10 @@ public class AmazfitNeoCoordinator extends HuamiCoordinator {
|
||||
HeartRateCapability.MeasurementInterval.MINUTES_30
|
||||
);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitNeoSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex.AmazfitTRexSupport;
|
||||
|
||||
public class AmazfitTRexCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRexCoordinator.class);
|
||||
@ -108,4 +110,10 @@ public class AmazfitTRexCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitTRexSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex2.AmazfitTRex2Support;
|
||||
|
||||
public class AmazfitTRex2Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRex2Coordinator.class);
|
||||
@ -56,6 +58,12 @@ public class AmazfitTRex2Coordinator extends Huami2021Coordinator {
|
||||
return DeviceType.AMAZFITTREX2;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitTRex2Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||
return new AmazfitTRex2FWInstallHandler(uri, context);
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexpro.AmazfitTRexProSupport;
|
||||
|
||||
public class AmazfitTRexProCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRexProCoordinator.class);
|
||||
@ -108,4 +110,10 @@ public class AmazfitTRexProCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitTRexProSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexultra.AmazfitTRexUltraSupport;
|
||||
|
||||
public class AmazfitTRexUltraCoordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRexUltraCoordinator.class);
|
||||
@ -40,6 +42,12 @@ public class AmazfitTRexUltraCoordinator extends Huami2021Coordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitTRexUltraSupport.class;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceType getSupportedType(final GBDeviceCandidate candidate) {
|
||||
|
@ -31,6 +31,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitvergel.AmazfitVergeLSupport;
|
||||
|
||||
public class AmazfitVergeLCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitVergeLCoordinator.class);
|
||||
@ -108,4 +110,10 @@ public class AmazfitVergeLCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitVergeLSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitx.AmazfitXFWIns
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitx.AmazfitXSupport;
|
||||
|
||||
public class AmazfitXCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitXCoordinator.class);
|
||||
@ -125,6 +127,12 @@ public class AmazfitXCoordinator extends HuamiCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return AmazfitXSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
|
@ -26,6 +26,8 @@ import androidx.annotation.NonNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
@ -33,6 +35,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband2.MiBand2Support;
|
||||
|
||||
public class MiBand2Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand2Coordinator.class);
|
||||
@ -104,4 +109,15 @@ public class MiBand2Coordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand2Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
@ -33,6 +35,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband2.MiBand2Support;
|
||||
|
||||
public class MiBand2HRXCoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand2HRXCoordinator.class);
|
||||
@ -106,4 +111,15 @@ public class MiBand2HRXCoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand2Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband3.MiBand3Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
public class MiBand3Coordinator extends HuamiCoordinator {
|
||||
@ -149,4 +151,10 @@ public class MiBand3Coordinator extends HuamiCoordinator {
|
||||
"zh_TW",
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand3Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband4.MiBand4Support;
|
||||
|
||||
public class MiBand4Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand4Coordinator.class);
|
||||
@ -164,4 +166,10 @@ public class MiBand4Coordinator extends HuamiCoordinator {
|
||||
HeartRateCapability.MeasurementInterval.MINUTES_30
|
||||
);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand4Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband5.MiBand5Support;
|
||||
|
||||
public class MiBand5Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand5Coordinator.class);
|
||||
@ -182,4 +184,10 @@ public class MiBand5Coordinator extends HuamiCoordinator {
|
||||
HeartRateCapability.MeasurementInterval.MINUTES_30
|
||||
);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand5Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband6.MiBand6Support;
|
||||
|
||||
public class MiBand6Coordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand6Coordinator.class);
|
||||
@NonNull
|
||||
@ -173,4 +176,10 @@ public class MiBand6Coordinator extends HuamiCoordinator {
|
||||
HeartRateCapability.MeasurementInterval.MINUTES_30
|
||||
);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand6Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7.MiBand7Support;
|
||||
|
||||
public class MiBand7Coordinator extends Huami2021Coordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiBand7Coordinator.class);
|
||||
@ -71,6 +73,12 @@ public class MiBand7Coordinator extends Huami2021Coordinator {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBand7Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsBluetoothPhoneCalls(final GBDevice device) {
|
||||
return false;
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe.ZeppESupport;
|
||||
|
||||
public class ZeppECoordinator extends HuamiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ZeppECoordinator.class);
|
||||
@ -107,4 +109,10 @@ public class ZeppECoordinator extends HuamiCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return ZeppESupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.id115.ID115Support;
|
||||
|
||||
public class ID115Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -163,4 +165,10 @@ public class ID115Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return ID115Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.itag.ITagSupport;
|
||||
|
||||
public class ITagCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Override
|
||||
@ -155,6 +157,12 @@ public class ITagCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return ITagSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@ -40,6 +40,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.BFH16DeviceSupport;
|
||||
|
||||
public class BFH16DeviceCoordinator extends AbstractBLEDeviceCoordinator
|
||||
{
|
||||
@ -188,6 +190,12 @@ public class BFH16DeviceCoordinator extends AbstractBLEDeviceCoordinator
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return BFH16DeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsScreenshots() {
|
||||
return false;
|
||||
|
@ -45,6 +45,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.TeclastH30.TeclastH30Support;
|
||||
|
||||
public class TeclastH30Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -106,6 +108,12 @@ public class TeclastH30Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return TeclastH30Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceType getDeviceType() {
|
||||
return DeviceType.TECLASTH30;
|
||||
|
@ -36,6 +36,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.y5.Y5Support;
|
||||
|
||||
public class Y5Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Override
|
||||
@ -146,4 +148,10 @@ public class Y5Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
public boolean supportsFindDevice() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return Y5Support.class;
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.LefunDeviceSupport;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.lefun.LefunConstants.ADVERTISEMENT_NAME;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.lefun.LefunConstants.MANUFACTURER_NAME;
|
||||
@ -170,4 +172,10 @@ public class LefunDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return LefunDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
@ -53,6 +54,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.watchxplus.WatchXPlusDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
@ -200,6 +203,17 @@ public class WatchXPlusDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return WatchXPlusDeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
|
||||
// find phone settings
|
||||
/**
|
||||
* @return {@link #FindPhone_OFF}, {@link #FindPhone_ON}, or the duration
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.liveview.LiveviewSupport;
|
||||
|
||||
public class LiveviewCoordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -129,6 +131,12 @@ public class LiveviewCoordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return LiveviewSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
|
||||
// nothing to delete, yet
|
||||
|
@ -49,6 +49,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.makibeshr3.MakibesHR3DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
@ -276,4 +278,10 @@ public class MakibesHR3Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MakibesHR3DeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import de.greenrobot.dao.query.QueryBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
@ -50,6 +51,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityUser;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivityUser.PREF_USER_NAME;
|
||||
@ -271,6 +275,12 @@ public class MiBandCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiBandSupport.class;
|
||||
}
|
||||
|
||||
private boolean isMi1S(String hardwareVersion) {
|
||||
return MiBandConst.MI_1S.equals(hardwareVersion);
|
||||
}
|
||||
@ -278,4 +288,9 @@ public class MiBandCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
private boolean isMiPro(String hardwareVersion) {
|
||||
return MiBandConst.MI_PRO.equals(hardwareVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.mijia_lywsd02.MijiaLywsd02Support;
|
||||
|
||||
public class MijiaLywsd02Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -134,6 +136,12 @@ public class MijiaLywsd02Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MijiaLywsd02Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@ -44,7 +44,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miscale2.MiScale2DeviceSupport;
|
||||
|
||||
public class MiScale2DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MiScale2DeviceCoordinator.class);
|
||||
@ -173,4 +175,10 @@ public class MiScale2DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public boolean supportsFindDevice() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return MiScale2DeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.no1f1.No1F1Support;
|
||||
|
||||
public class No1F1Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -155,6 +157,12 @@ public class No1F1Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return No1F1Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
|
||||
Long deviceId = device.getId();
|
||||
|
@ -19,6 +19,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.BatteryConfig;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.nothing.Ear1Support;
|
||||
|
||||
public class Ear1Coordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
|
||||
@ -134,6 +136,12 @@ public class Ear1Coordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
return new BatteryConfig[]{battery1, battery2, battery3};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return Ear1Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
|
||||
return new int[] {
|
||||
|
@ -39,6 +39,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.nut.NutSupport;
|
||||
|
||||
public class NutCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Override
|
||||
@ -77,6 +79,12 @@ public class NutCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return NutSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getPairingActivity() {
|
||||
return null;
|
||||
|
@ -45,6 +45,8 @@ import nodomain.freeyourgadget.gadgetbridge.entities.PebbleMorpheuzSampleDao;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.PebbleUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
|
||||
@ -237,4 +239,10 @@ public class PebbleCoordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return PebbleSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.pinetime.PineTimeJFSupport;
|
||||
|
||||
public class PineTimeJFCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -153,6 +155,12 @@ public class PineTimeJFCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return PineTimeJFSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@ -34,6 +34,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.qc35.QC35BaseSupport;
|
||||
|
||||
public class QC35Coordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
@Override
|
||||
@ -68,6 +70,12 @@ public class QC35Coordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return QC35BaseSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsActivityDataFetching() {
|
||||
return false;
|
||||
|
@ -53,6 +53,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.QHybridSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Version;
|
||||
|
||||
@ -267,6 +269,12 @@ public class QHybridCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return supportedSettings;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return QHybridSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSupportedDeviceSpecificAuthenticationSettings() {
|
||||
return new int[]{
|
||||
|
@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory;
|
||||
import androidx.annotation.NonNull;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.roidmi.RoidmiSupport;
|
||||
|
||||
public class Roidmi1Coordinator extends RoidmiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Roidmi1Coordinator.class);
|
||||
@ -56,4 +58,10 @@ public class Roidmi1Coordinator extends RoidmiCoordinator {
|
||||
// Roidmi 1 does not have voltage support
|
||||
return 0;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return RoidmiSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ import org.slf4j.LoggerFactory;
|
||||
import androidx.annotation.NonNull;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.roidmi.RoidmiSupport;
|
||||
|
||||
public class Roidmi3Coordinator extends RoidmiCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Roidmi3Coordinator.class);
|
||||
@ -59,4 +61,10 @@ public class Roidmi3Coordinator extends RoidmiCoordinator {
|
||||
public boolean supportsRgbLedColor() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return RoidmiSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.smaq2oss.SMAQ2OSSSupport;
|
||||
|
||||
public class SMAQ2OSSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SMAQ2OSSCoordinator.class);
|
||||
@ -156,4 +158,10 @@ public class SMAQ2OSSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public boolean supportsMusicInfo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return SMAQ2OSSSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.soflow.SoFlowSupport;
|
||||
|
||||
public class SoFlowCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -150,4 +152,10 @@ public class SoFlowCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_lock_unlock
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return SoFlowSupport.class;
|
||||
}
|
||||
}
|
@ -43,6 +43,8 @@ import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.SonyHeadphonesSupport;
|
||||
|
||||
public abstract class SonyHeadphonesCoordinator extends AbstractBLClassicDeviceCoordinator {
|
||||
@Override
|
||||
@ -257,4 +259,10 @@ public abstract class SonyHeadphonesCoordinator extends AbstractBLClassicDeviceC
|
||||
public boolean preferServiceV2() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return SonyHeadphonesSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphon
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.SonyHeadphonesSupport;
|
||||
|
||||
public class SonyWH1000XM4Coordinator extends SonyHeadphonesCoordinator {
|
||||
@NonNull
|
||||
|
@ -35,6 +35,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.SonySWR12DeviceSupport;
|
||||
|
||||
public class SonySWR12DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -144,4 +146,10 @@ public class SonySWR12DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
|
||||
return new int[]{R.xml.devicesettings_sonyswr12};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return SonySWR12DeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.supercars.SuperCarsSupport;
|
||||
|
||||
public class SuperCarsCoordinator extends AbstractDeviceCoordinator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SuperCarsCoordinator.class);
|
||||
@ -63,6 +65,12 @@ public class SuperCarsCoordinator extends AbstractDeviceCoordinator {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return SuperCarsSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getAppsManagementActivity() {
|
||||
return ControlActivity.class;
|
||||
|
@ -36,6 +36,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.tlw64.TLW64Support;
|
||||
|
||||
public class TLW64Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -149,4 +151,10 @@ public class TLW64Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return TLW64Support.class;
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.um25.Support.UM25Support;
|
||||
|
||||
public class UM25Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
@ -150,6 +151,12 @@ public class UM25Coordinator extends AbstractBLEDeviceCoordinator {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return UM25Support.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_NONE;
|
||||
|
@ -21,6 +21,8 @@ import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.ParcelUuid;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -35,6 +37,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vesc.VescDeviceSupport;
|
||||
|
||||
public class VescCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public final static String UUID_SERVICE_SERIAL_HM10 = "0000ffe0-0000-1000-8000-00805f9b34fb";
|
||||
@ -58,6 +62,12 @@ public class VescCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return VescDeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
|
||||
ParcelUuid[] uuids = candidate.getServiceUuids();
|
||||
|
@ -23,6 +23,8 @@ import android.net.Uri;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractBLEDeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
||||
@ -32,6 +34,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.VibratissimoSupport;
|
||||
|
||||
public class VibratissimoCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -129,6 +134,17 @@ public class VibratissimoCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return VibratissimoSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) {
|
||||
// nothing to delete, yet
|
||||
|
@ -34,6 +34,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vivomovehr.VivomoveHrSupport;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -143,6 +145,12 @@ public class VivomoveHrCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return VivomoveHrSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFindDevice() {
|
||||
return true;
|
||||
|
@ -41,6 +41,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.waspos.WaspOSDeviceSupport;
|
||||
|
||||
public class WaspOSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
|
||||
@ -170,4 +172,10 @@ public class WaspOSCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return WaspOSDeviceSupport.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import android.os.ParcelUuid;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -40,6 +41,9 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
|
||||
|
||||
public class Watch9DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@Override
|
||||
@ -163,6 +167,17 @@ public class Watch9DeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return Watch9DeviceSupport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ServiceDeviceSupport.Flags> getInitialFlags() {
|
||||
return EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<? extends Activity> getCalibrationActivity() {
|
||||
|
@ -38,6 +38,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.withingssteelhr.WithingsSteelHRDeviceSupport;
|
||||
|
||||
public class WithingsSteelHRDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||
|
||||
@ -184,4 +186,10 @@ public class WithingsSteelHRDeviceCoordinator extends AbstractDeviceCoordinator
|
||||
"it_IT",
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return WithingsSteelHRDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
|
||||
|
||||
public class XWatchCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@NonNull
|
||||
@ -135,4 +137,10 @@ public class XWatchCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
public boolean supportsFindDevice() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return XWatchSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
|
||||
|
||||
|
||||
public class ZeTimeCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
@ -170,4 +172,10 @@ public class ZeTimeCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
R.xml.devicesettings_transliteration
|
||||
};
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||
return ZeTimeDeviceSupport.class;
|
||||
}
|
||||
}
|
||||
|
@ -24,109 +24,29 @@ package nodomain.freeyourgadget.gadgetbridge.service;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.asteroidos.AsteroidOSDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.banglejs.BangleJSDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.binary_sensor.BinarySensorSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gb6900.CasioGB6900DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gbx100.CasioGBX100DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.casio.gwb5600.CasioGWB5600DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.domyos.DomyosT540Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.fitpro.FitProDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.flipper.zero.support.FlipperZeroSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.galaxy_buds.GalaxyBudsDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.hplus.HPlusSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband5.AmazfitBand5Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband7.AmazfitBand7Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipLiteSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip3pro.AmazfitBip3ProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip5.AmazfitBip5Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSLiteSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipu.AmazfitBipUSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipupro.AmazfitBipUProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahpro.AmazfitCheetahProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahround.AmazfitCheetahRoundSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor.AmazfitCorSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor2.AmazfitCor2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitfalcon.AmazfitFalconSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRLiteSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2eSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3.AmazfitGTR3Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3pro.AmazfitGTR3ProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr4.AmazfitGTR4Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtrmini.AmazfitGTRMiniSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts.AmazfitGTSSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2MiniSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2eSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts3.AmazfitGTS3Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4.AmazfitGTS4Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4mini.AmazfitGTS4MiniSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitneo.AmazfitNeoSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitpop.AmazfitPopSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitpoppro.AmazfitPopProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex.AmazfitTRexSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex2.AmazfitTRex2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexpro.AmazfitTRexProSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexultra.AmazfitTRexUltraSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitvergel.AmazfitVergeLSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitx.AmazfitXSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband2.MiBand2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband3.MiBand3Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband4.MiBand4Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband5.MiBand5Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband6.MiBand6Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7.MiBand7Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe.ZeppESupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.id115.ID115Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.itag.ITagSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.BFH16DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.TeclastH30.TeclastH30Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.jyou.y5.Y5Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.LefunDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.lenovo.watchxplus.WatchXPlusDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.liveview.LiveviewSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.makibeshr3.MakibesHR3DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.mijia_lywsd02.MijiaLywsd02Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miscale2.MiScale2DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.no1f1.No1F1Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.nothing.Ear1Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.nut.NutSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.pinetime.PineTimeJFSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.qc35.QC35BaseSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.QHybridSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.roidmi.RoidmiSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.smaq2oss.SMAQ2OSSSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.soflow.SoFlowSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sony.headphones.SonyHeadphonesSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.sonyswr12.SonySWR12DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.supercars.SuperCarsSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.tlw64.TLW64Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.um25.Support.UM25Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vesc.VescDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vibratissimo.VibratissimoSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.vivomovehr.VivomoveHrSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.waspos.WaspOSDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.watch9.Watch9DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.withingssteelhr.WithingsSteelHRDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.xwatch.XWatchSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.zetime.ZeTimeDeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class DeviceSupportFactory {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DeviceSupportFactory.class);
|
||||
|
||||
private final BluetoothAdapter mBtAdapter;
|
||||
private final Context mContext;
|
||||
|
||||
@ -184,228 +104,28 @@ public class DeviceSupportFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private ServiceDeviceSupport createServiceDeviceSupport(GBDevice device){
|
||||
switch (device.getType()) {
|
||||
case PEBBLE:
|
||||
return new ServiceDeviceSupport(new PebbleSupport());
|
||||
case MIBAND:
|
||||
return new ServiceDeviceSupport(new MiBandSupport(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case MIBAND2:
|
||||
return new ServiceDeviceSupport(new MiBand2Support(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case MIBAND3:
|
||||
return new ServiceDeviceSupport(new MiBand3Support());
|
||||
case MIBAND4:
|
||||
return new ServiceDeviceSupport(new MiBand4Support());
|
||||
case MIBAND5:
|
||||
return new ServiceDeviceSupport(new MiBand5Support());
|
||||
case MIBAND6:
|
||||
return new ServiceDeviceSupport(new MiBand6Support());
|
||||
case AMAZFITCHEETAHPRO:
|
||||
return new ServiceDeviceSupport(new AmazfitCheetahProSupport());
|
||||
case AMAZFITCHEETAHSQUARE:
|
||||
return new ServiceDeviceSupport(new AmazfitCheetahSquareSupport());
|
||||
case AMAZFITCHEETAHROUND:
|
||||
return new ServiceDeviceSupport(new AmazfitCheetahRoundSupport());
|
||||
case AMAZFITBIP5:
|
||||
return new ServiceDeviceSupport(new AmazfitBip5Support());
|
||||
case AMAZFITTREXULTRA:
|
||||
return new ServiceDeviceSupport(new AmazfitTRexUltraSupport());
|
||||
case AMAZFITGTRMINI:
|
||||
return new ServiceDeviceSupport(new AmazfitGTRMiniSupport());
|
||||
case AMAZFITFALCON:
|
||||
return new ServiceDeviceSupport(new AmazfitFalconSupport());
|
||||
case AMAZFITGTS3:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS3Support());
|
||||
case AMAZFITGTR3:
|
||||
return new ServiceDeviceSupport(new AmazfitGTR3Support());
|
||||
case AMAZFITGTR4:
|
||||
return new ServiceDeviceSupport(new AmazfitGTR4Support());
|
||||
case MIBAND7:
|
||||
return new ServiceDeviceSupport(new MiBand7Support());
|
||||
case AMAZFITBAND7:
|
||||
return new ServiceDeviceSupport(new AmazfitBand7Support());
|
||||
case AMAZFITGTS4:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS4Support());
|
||||
case AMAZFITGTS4MINI:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS4MiniSupport());
|
||||
case AMAZFITTREX2:
|
||||
return new ServiceDeviceSupport(new AmazfitTRex2Support());
|
||||
case AMAZFITGTR3PRO:
|
||||
return new ServiceDeviceSupport(new AmazfitGTR3ProSupport());
|
||||
case AMAZFITBIP:
|
||||
return new ServiceDeviceSupport(new AmazfitBipSupport());
|
||||
case AMAZFITBIP_LITE:
|
||||
return new ServiceDeviceSupport(new AmazfitBipLiteSupport());
|
||||
case AMAZFITBIPS:
|
||||
return new ServiceDeviceSupport(new AmazfitBipSSupport());
|
||||
case AMAZFITBIPS_LITE:
|
||||
return new ServiceDeviceSupport(new AmazfitBipSLiteSupport());
|
||||
case AMAZFITBIPU:
|
||||
return new ServiceDeviceSupport(new AmazfitBipUSupport());
|
||||
case AMAZFITBIPUPRO:
|
||||
return new ServiceDeviceSupport(new AmazfitBipUProSupport());
|
||||
case AMAZFITBIP3PRO:
|
||||
return new ServiceDeviceSupport(new AmazfitBip3ProSupport());
|
||||
case AMAZFITPOP:
|
||||
return new ServiceDeviceSupport(new AmazfitPopSupport());
|
||||
case AMAZFITPOPPRO:
|
||||
return new ServiceDeviceSupport(new AmazfitPopProSupport());
|
||||
case AMAZFITGTR:
|
||||
return new ServiceDeviceSupport(new AmazfitGTRSupport());
|
||||
case AMAZFITGTR_LITE:
|
||||
return new ServiceDeviceSupport(new AmazfitGTRLiteSupport());
|
||||
case AMAZFITGTR2:
|
||||
return new ServiceDeviceSupport(new AmazfitGTR2Support());
|
||||
case ZEPP_E:
|
||||
return new ServiceDeviceSupport(new ZeppESupport());
|
||||
case AMAZFITGTR2E:
|
||||
return new ServiceDeviceSupport(new AmazfitGTR2eSupport());
|
||||
case AMAZFITTREX:
|
||||
return new ServiceDeviceSupport(new AmazfitTRexSupport());
|
||||
case AMAZFITTREXPRO:
|
||||
return new ServiceDeviceSupport(new AmazfitTRexProSupport());
|
||||
case AMAZFITGTS:
|
||||
return new ServiceDeviceSupport(new AmazfitGTSSupport());
|
||||
case AMAZFITVERGEL:
|
||||
return new ServiceDeviceSupport(new AmazfitVergeLSupport());
|
||||
case AMAZFITGTS2:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS2Support());
|
||||
case AMAZFITGTS2_MINI:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS2MiniSupport());
|
||||
case AMAZFITGTS2E:
|
||||
return new ServiceDeviceSupport(new AmazfitGTS2eSupport());
|
||||
case AMAZFITCOR:
|
||||
return new ServiceDeviceSupport(new AmazfitCorSupport());
|
||||
case AMAZFITCOR2:
|
||||
return new ServiceDeviceSupport(new AmazfitCor2Support());
|
||||
case AMAZFITBAND5:
|
||||
return new ServiceDeviceSupport(new AmazfitBand5Support());
|
||||
case AMAZFITX:
|
||||
return new ServiceDeviceSupport(new AmazfitXSupport());
|
||||
case AMAZFITNEO:
|
||||
return new ServiceDeviceSupport(new AmazfitNeoSupport());
|
||||
case VIBRATISSIMO:
|
||||
return new ServiceDeviceSupport(new VibratissimoSupport(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case LIVEVIEW:
|
||||
return new ServiceDeviceSupport(new LiveviewSupport());
|
||||
case HPLUS:
|
||||
case MAKIBESF68:
|
||||
case EXRIZUK8:
|
||||
case Q8:
|
||||
return new ServiceDeviceSupport(new HPlusSupport(device.getType()));
|
||||
case NO1F1:
|
||||
return new ServiceDeviceSupport(new No1F1Support());
|
||||
case TECLASTH30:
|
||||
return new ServiceDeviceSupport(new TeclastH30Support());
|
||||
case XWATCH:
|
||||
return new ServiceDeviceSupport(new XWatchSupport());
|
||||
case FOSSILQHYBRID:
|
||||
return new ServiceDeviceSupport(new QHybridSupport());
|
||||
case ZETIME:
|
||||
return new ServiceDeviceSupport(new ZeTimeDeviceSupport());
|
||||
case ID115:
|
||||
return new ServiceDeviceSupport(new ID115Support());
|
||||
case WATCH9:
|
||||
return new ServiceDeviceSupport(new Watch9DeviceSupport(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case WATCHXPLUS:
|
||||
return new ServiceDeviceSupport(new WatchXPlusDeviceSupport(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case ROIDMI:
|
||||
return new ServiceDeviceSupport(new RoidmiSupport());
|
||||
case ROIDMI3:
|
||||
return new ServiceDeviceSupport(new RoidmiSupport());
|
||||
case Y5:
|
||||
return new ServiceDeviceSupport(new Y5Support());
|
||||
case CASIOGB6900:
|
||||
return new ServiceDeviceSupport(new CasioGB6900DeviceSupport());
|
||||
case CASIOGBX100:
|
||||
return new ServiceDeviceSupport(new CasioGBX100DeviceSupport());
|
||||
case CASIOGWB5600:
|
||||
return new ServiceDeviceSupport(new CasioGWB5600DeviceSupport());
|
||||
case CASIOGMWB5000:
|
||||
return new ServiceDeviceSupport(new CasioGWB5600DeviceSupport());
|
||||
case MISCALE2:
|
||||
return new ServiceDeviceSupport(new MiScale2DeviceSupport());
|
||||
case BFH16:
|
||||
return new ServiceDeviceSupport(new BFH16DeviceSupport());
|
||||
case MIJIA_LYWSD02:
|
||||
return new ServiceDeviceSupport(new MijiaLywsd02Support());
|
||||
case MAKIBESHR3:
|
||||
return new ServiceDeviceSupport(new MakibesHR3DeviceSupport());
|
||||
case ITAG:
|
||||
return new ServiceDeviceSupport(new ITagSupport());
|
||||
case NUTMINI:
|
||||
return new ServiceDeviceSupport(new NutSupport());
|
||||
case BANGLEJS:
|
||||
return new ServiceDeviceSupport(new BangleJSDeviceSupport());
|
||||
case TLW64:
|
||||
return new ServiceDeviceSupport(new TLW64Support());
|
||||
case PINETIME_JF:
|
||||
return new ServiceDeviceSupport(new PineTimeJFSupport());
|
||||
case SG2:
|
||||
return new ServiceDeviceSupport(new HPlusSupport(DeviceType.SG2));
|
||||
case LEFUN:
|
||||
return new ServiceDeviceSupport(new LefunDeviceSupport());
|
||||
case BOHEMIC_SMART_BRACELET:
|
||||
return new ServiceDeviceSupport(new LefunDeviceSupport());
|
||||
case SONY_SWR12:
|
||||
return new ServiceDeviceSupport(new SonySWR12DeviceSupport());
|
||||
case WASPOS:
|
||||
return new ServiceDeviceSupport(new WaspOSDeviceSupport());
|
||||
case SMAQ2OSS:
|
||||
return new ServiceDeviceSupport(new SMAQ2OSSSupport());
|
||||
case UM25:
|
||||
return new ServiceDeviceSupport(new UM25Support());
|
||||
case DOMYOS_T540:
|
||||
return new ServiceDeviceSupport(new DomyosT540Support(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case FITPRO:
|
||||
return new ServiceDeviceSupport(new FitProDeviceSupport(), ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case NOTHING_EAR1:
|
||||
return new ServiceDeviceSupport(new Ear1Support());
|
||||
case GALAXY_BUDS:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport());
|
||||
case GALAXY_BUDS_LIVE:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport());
|
||||
case GALAXY_BUDS_PRO:
|
||||
case GALAXY_BUDS2:
|
||||
case GALAXY_BUDS2_PRO:
|
||||
return new ServiceDeviceSupport(new GalaxyBudsDeviceSupport(), ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case SONY_WH_1000XM3:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_WH_1000XM4:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_WF_SP800N:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport(), ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
case SONY_WF_1000XM3:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_WH_1000XM2:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_WF_1000XM4:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_LINKBUDS_S:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case SONY_WH_1000XM5:
|
||||
return new ServiceDeviceSupport(new SonyHeadphonesSupport());
|
||||
case VESC_NRF:
|
||||
case VESC_HM10:
|
||||
return new ServiceDeviceSupport(new VescDeviceSupport(device.getType()));
|
||||
case BOSE_QC35:
|
||||
return new ServiceDeviceSupport(new QC35BaseSupport());
|
||||
case BINARY_SENSOR:
|
||||
return new ServiceDeviceSupport(new BinarySensorSupport());
|
||||
case FLIPPER_ZERO:
|
||||
return new ServiceDeviceSupport(new FlipperZeroSupport());
|
||||
case SUPER_CARS:
|
||||
return new ServiceDeviceSupport(new SuperCarsSupport());
|
||||
case ASTEROIDOS:
|
||||
return new ServiceDeviceSupport(new AsteroidOSDeviceSupport());
|
||||
case SOFLOW_SO6:
|
||||
return new ServiceDeviceSupport(new SoFlowSupport());
|
||||
case WITHINGS_STEEL_HR:
|
||||
return new ServiceDeviceSupport(new WithingsSteelHRDeviceSupport());
|
||||
case VIVOMOVE_HR:
|
||||
return new ServiceDeviceSupport(new VivomoveHrSupport());
|
||||
private ServiceDeviceSupport createServiceDeviceSupport(GBDevice device) throws GBException {
|
||||
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(device);
|
||||
Class supportClass = coordinator.getDeviceSupportClass();
|
||||
|
||||
try {
|
||||
Constructor supportConstructor = supportClass.getConstructor(DeviceType.class);
|
||||
DeviceSupport supportInstance = (DeviceSupport) supportConstructor.newInstance(device.getType());
|
||||
return new ServiceDeviceSupport(supportInstance, coordinator.getInitialFlags());
|
||||
} catch (NoSuchMethodException e) {
|
||||
// ignore, let next call get the default, zero-argument constructor
|
||||
} catch (ReflectiveOperationException e) {
|
||||
LOG.error("error calling DeviceSupport constructor with argument 'DeviceType'");
|
||||
throw new GBException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
DeviceSupport supportInstance = (DeviceSupport) supportClass.newInstance();
|
||||
return new ServiceDeviceSupport(supportInstance, coordinator.getInitialFlags());
|
||||
} catch (ReflectiveOperationException e) {
|
||||
LOG.error("error calling DeviceSupport constructor with zero arguments");
|
||||
throw new GBException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private DeviceSupport createBTDeviceSupport(GBDevice gbDevice) throws GBException {
|
||||
@ -425,7 +145,7 @@ public class DeviceSupportFactory {
|
||||
|
||||
private DeviceSupport createTCPDeviceSupport(GBDevice gbDevice) throws GBException {
|
||||
try {
|
||||
DeviceSupport deviceSupport = new ServiceDeviceSupport(new PebbleSupport(), ServiceDeviceSupport.Flags.BUSY_CHECKING);
|
||||
DeviceSupport deviceSupport = new ServiceDeviceSupport(new PebbleSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
deviceSupport.setContext(gbDevice, mBtAdapter, mContext);
|
||||
return deviceSupport;
|
||||
} catch (Exception e) {
|
||||
|
@ -50,8 +50,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.WorldClock;
|
||||
* Wraps another device support instance and supports busy-checking and throttling of events.
|
||||
*/
|
||||
public class ServiceDeviceSupport implements DeviceSupport {
|
||||
|
||||
enum Flags {
|
||||
public static enum Flags {
|
||||
THROTTLING,
|
||||
BUSY_CHECKING,
|
||||
}
|
||||
@ -65,14 +64,9 @@ public class ServiceDeviceSupport implements DeviceSupport {
|
||||
private String lastNotificationKind;
|
||||
private final EnumSet<Flags> flags;
|
||||
|
||||
public ServiceDeviceSupport(DeviceSupport delegate, Flags... flags) {
|
||||
public ServiceDeviceSupport(DeviceSupport delegate, EnumSet<Flags> flags) {
|
||||
this.delegate = delegate;
|
||||
this.flags = EnumSet.noneOf(Flags.class);
|
||||
this.flags.addAll(Arrays.asList(flags));
|
||||
}
|
||||
|
||||
public ServiceDeviceSupport(DeviceSupport delegate){
|
||||
this(delegate, Flags.BUSY_CHECKING);
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,19 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.unknown;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.AbstractDeviceSupport;
|
||||
|
||||
public class UnknownDeviceSupport extends AbstractDeviceSupport {
|
||||
@Override
|
||||
public boolean connect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useAutoConnect() {
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user