diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/UnknownDeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/UnknownDeviceCoordinator.java index 2e41fbe43..b5db76d6c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/UnknownDeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/UnknownDeviceCoordinator.java @@ -43,7 +43,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.unknown.UnknownDevic public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { private final UnknownSampleProvider sampleProvider; - private static final class UnknownSampleProvider implements SampleProvider { + private static final class UnknownSampleProvider implements SampleProvider { @Override public ActivityKind normalizeType(int rawType) { return ActivityKind.UNKNOWN; @@ -60,12 +60,12 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { } @Override - public List getAllActivitySamples(int timestamp_from, int timestamp_to) { + public List getAllActivitySamples(int timestamp_from, int timestamp_to) { return null; } @Override - public List getActivitySamples(int timestamp_from, int timestamp_to) { + public List getActivitySamples(int timestamp_from, int timestamp_to) { return null; } @@ -100,7 +100,6 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { sampleProvider = new UnknownSampleProvider(); } - @NonNull @Override public boolean supports(GBDeviceCandidate candidate) { return false; @@ -125,39 +124,9 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { return null; } - @Override - public boolean supportsActivityDataFetching() { - return false; - } - - @Override - public boolean supportsActivityTracking() { - return false; - } - - @Override - public boolean supportsScreenshots(final GBDevice device) { - return false; - } - - @Override - public int getAlarmSlotCount(GBDevice device) { - return 0; - } - - @Override - public boolean supportsHeartRateMeasurement(GBDevice device) { - return false; - } - @Override public String getManufacturer() { - return "unknown"; - } - - @Override - public boolean supportsAppsManagement(final GBDevice device) { - return false; + return "Generic"; } @Override @@ -165,42 +134,6 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { return null; } - @Override - public boolean supportsCalendarEvents() { - return false; - } - - @Override - public boolean supportsRealtimeData() { - return false; - } - - @Override - public boolean supportsWeather() { - return false; - } - - @Override - public boolean supportsFindDevice() { - return false; - } - - @Override - public boolean supportsLedColor() { - return false; - } - - @Override - public boolean supportsRgbLedColor() { - return false; - } - - @NonNull - @Override - public int[] getColorPresets() { - return new int[0]; - } - @NonNull @Override public Class getDeviceSupportClass() { @@ -213,7 +146,6 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator { return R.string.devicetype_unknown; } - @Override @DrawableRes public int getDefaultIconResource() { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/binary_sensor/coordinator/BinarySensorCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/binary_sensor/coordinator/BinarySensorCoordinator.java index f2d7485f4..ab3767e2c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/binary_sensor/coordinator/BinarySensorCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/binary_sensor/coordinator/BinarySensorCoordinator.java @@ -125,7 +125,7 @@ public class BinarySensorCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "DIY"; + return "Generic"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cycling_sensor/coordinator/CyclingSensorCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cycling_sensor/coordinator/CyclingSensorCoordinator.java index 44f9cb014..8dedd9fd5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cycling_sensor/coordinator/CyclingSensorCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/cycling_sensor/coordinator/CyclingSensorCoordinator.java @@ -75,7 +75,7 @@ public class CyclingSensorCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "Unknown"; + return "Generic"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/femometer/FemometerVinca2DeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/femometer/FemometerVinca2DeviceCoordinator.java index d3f90ff77..3a51cc962 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/femometer/FemometerVinca2DeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/femometer/FemometerVinca2DeviceCoordinator.java @@ -39,7 +39,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.femometer.FemometerV public class FemometerVinca2DeviceCoordinator extends AbstractDeviceCoordinator { @Override public String getManufacturer() { - return "Joytech Healthcare"; + // Actual manufacturer is Joytech Healthcare + return "Femometer"; } @NonNull diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/flipper/zero/FlipperZeroCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/flipper/zero/FlipperZeroCoordinator.java index 2690ff013..f8727ab4e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/flipper/zero/FlipperZeroCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/flipper/zero/FlipperZeroCoordinator.java @@ -92,7 +92,7 @@ public class FlipperZeroCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "Flipper devices"; + return "Flipper Devices"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/hplus/EXRIZUK8Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/hplus/EXRIZUK8Coordinator.java index ee2c4e149..ce7784fd1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/hplus/EXRIZUK8Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/hplus/EXRIZUK8Coordinator.java @@ -22,13 +22,9 @@ package nodomain.freeyourgadget.gadgetbridge.devices.hplus; */ -import androidx.annotation.NonNull; - import java.util.regex.Pattern; import nodomain.freeyourgadget.gadgetbridge.R; -import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate; -import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; /** * Pseudo Coordinator for the EXRIZU K8, a sub type of the HPLUS devices @@ -41,7 +37,7 @@ public class EXRIZUK8Coordinator extends HPlusCoordinator { @Override public String getManufacturer() { - return "EXRIZU"; + return "Exrizu"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiCoordinator.java index d8b86a83d..b32c4dde9 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/HuamiCoordinator.java @@ -26,9 +26,6 @@ import android.os.ParcelUuid; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -63,8 +60,6 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiVibration import nodomain.freeyourgadget.gadgetbridge.util.Prefs; public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator { - private static final Logger LOG = LoggerFactory.getLogger(HuamiCoordinator.class); - @Override public Class getPairingActivity() { return MiBandPairingActivity.class; @@ -95,11 +90,6 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator { return "Huami"; } - @Override - public boolean supportsAppsManagement(final GBDevice device) { - return false; - } - @Override public boolean supportsFlashing() { return true; @@ -110,11 +100,6 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator { return null; } - @Override - public boolean supportsCalendarEvents() { - return false; - } - @Override public boolean supportsRealtimeData() { return true; @@ -525,11 +510,6 @@ public abstract class HuamiCoordinator extends AbstractBLEDeviceCoordinator { return prefs.getBoolean(DeviceSettingsPreferenceConst.PREF_WORKOUT_SEND_GPS_TO_BAND, false); } - @Override - public boolean supportsScreenshots(final GBDevice device) { - return false; - } - @Override public boolean supportsFindDevice() { return true; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitband5/AmazfitBand5Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitband5/AmazfitBand5Coordinator.java index fdd1f3b8d..87761de45 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitband5/AmazfitBand5Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitband5/AmazfitBand5Coordinator.java @@ -36,6 +36,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband5.AmazfitBand5Support; public class AmazfitBand5Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.AMAZFIT_BAND5_NAME, Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip/AmazfitBipCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip/AmazfitBipCoordinator.java index f5a89f0d4..d17c28266 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip/AmazfitBipCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip/AmazfitBipCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipSupport; public class AmazfitBipCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Bip Watch", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3/AmazfitBip3Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3/AmazfitBip3Coordinator.java index 8fc23ebfb..5b9741697 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3/AmazfitBip3Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3/AmazfitBip3Coordinator.java @@ -34,6 +34,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip3.AmazfitBip3Support; public class AmazfitBip3Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("^Amazfit Bip 3$", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3pro/AmazfitBip3ProCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3pro/AmazfitBip3ProCoordinator.java index d63e7aef9..882afb2e1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3pro/AmazfitBip3ProCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbip3pro/AmazfitBip3ProCoordinator.java @@ -34,6 +34,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip3pro.AmazfitBip3ProSupport; public class AmazfitBip3ProCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Bip 3 Pro", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbips/AmazfitBipSCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbips/AmazfitBipSCoordinator.java index 13ee1b9c1..3e317745a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbips/AmazfitBipSCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbips/AmazfitBipSCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSSupport; public class AmazfitBipSCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Bip S", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java index fa71c524b..d9e8e305b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipu/AmazfitBipUCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipu.AmazfitBipUSupport; public class AmazfitBipUCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Bip U", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipupro/AmazfitBipUProCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipupro/AmazfitBipUProCoordinator.java index 68af6065e..516252924 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipupro/AmazfitBipUProCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitbipupro/AmazfitBipUProCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbipupro.AmazfitBipUProSupport; public class AmazfitBipUProCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Bip U Pro", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor/AmazfitCorCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor/AmazfitCorCoordinator.java index 75816b50b..70ca8271c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor/AmazfitCorCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor/AmazfitCorCoordinator.java @@ -22,9 +22,6 @@ import android.net.Uri; import androidx.annotation.NonNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.List; import java.util.regex.Pattern; @@ -34,12 +31,16 @@ import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpec import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler; 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 { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Band|Amazfit Cor", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor2/AmazfitCor2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor2/AmazfitCor2Coordinator.java index c475406f2..1e85bcc6b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor2/AmazfitCor2Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitcor2/AmazfitCor2Coordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor2.AmazfitCor2Support; public class AmazfitCor2Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Band 2|Amazfit Cor 2", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRCoordinator.java index 566eeaf8e..0c8dcb7a3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRSupport; public class AmazfitGTRCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTR", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRLiteCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRLiteCoordinator.java index 83f375cba..5f698efd3 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRLiteCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr/AmazfitGTRLiteCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRLiteSupport; public class AmazfitGTRLiteCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTR L", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2Coordinator.java index da85846c2..c79693e2a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2Coordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2Support; public class AmazfitGTR2Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTR 2", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2eCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2eCoordinator.java index dbb3b5d1b..a573093d1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2eCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgtr2/AmazfitGTR2eCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr2.AmazfitGTR2eSupport; public class AmazfitGTR2eCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTR 2e", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts/AmazfitGTSCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts/AmazfitGTSCoordinator.java index 21fd5a4d6..165b7ff06 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts/AmazfitGTSCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts/AmazfitGTSCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts.AmazfitGTSSupport; public class AmazfitGTSCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTS", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2Coordinator.java index 0a4fcae4a..255dec957 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2Coordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2Support; public class AmazfitGTS2Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTS 2", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2eCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2eCoordinator.java index 274815d15..4016de522 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2eCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitgts2/AmazfitGTS2eCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts2.AmazfitGTS2eSupport; public class AmazfitGTS2eCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit GTS 2e", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitneo/AmazfitNeoCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitneo/AmazfitNeoCoordinator.java index d0a42844c..671f68c59 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitneo/AmazfitNeoCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitneo/AmazfitNeoCoordinator.java @@ -38,6 +38,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitneo.AmazfitNeoSupport; public class AmazfitNeoCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.AMAZFIT_NEO_NAME, Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex/AmazfitTRexCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex/AmazfitTRexCoordinator.java index 05dce981a..153d73f72 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex/AmazfitTRexCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrex/AmazfitTRexCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex.AmazfitTRexSupport; public class AmazfitTRexCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit T-Rex", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrexpro/AmazfitTRexProCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrexpro/AmazfitTRexProCoordinator.java index 608556a22..438e74a79 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrexpro/AmazfitTRexProCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfittrexpro/AmazfitTRexProCoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexpro.AmazfitTRexProSupport; public class AmazfitTRexProCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit T-Rex Pro", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitvergel/AmazfitVergeLCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitvergel/AmazfitVergeLCoordinator.java index 90eea363e..94497c4c8 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitvergel/AmazfitVergeLCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitvergel/AmazfitVergeLCoordinator.java @@ -34,6 +34,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitvergel.AmazfitVergeLSupport; public class AmazfitVergeLCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Amazfit Verge L", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitx/AmazfitXCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitx/AmazfitXCoordinator.java index 8876bb5b6..7d20ffc3f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitx/AmazfitXCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/amazfitx/AmazfitXCoordinator.java @@ -36,6 +36,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitx.AmazfitXSupport; public class AmazfitXCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.AMAZFIT_X, Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2Coordinator.java index b11434755..1767c9f64 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2Coordinator.java @@ -40,10 +40,17 @@ import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband2.MiBand2Support; public class MiBand2Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.MI_BAND2_NAME, Pattern.CASE_INSENSITIVE); } + @Override public InstallHandler findInstallHandler(final Uri uri, final Context context) { final MiBand2FWInstallHandler handler = new MiBand2FWInstallHandler(uri, context); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2HRXCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2HRXCoordinator.java index 8550a3f93..dad59529f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2HRXCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband2/MiBand2HRXCoordinator.java @@ -40,6 +40,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.ServiceDeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband2.MiBand2Support; public class MiBand2HRXCoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile( diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java index cd18ea2f2..d13b3675e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java @@ -40,6 +40,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband3.MiBand import nodomain.freeyourgadget.gadgetbridge.util.Prefs; public class MiBand3Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile( diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java index 290eb3bf3..9baeae83a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband4/MiBand4Coordinator.java @@ -39,6 +39,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband4.MiBand4Support; public class MiBand4Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.MI_BAND4_NAME, Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband5/MiBand5Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband5/MiBand5Coordinator.java index aa19c5895..db7f4d601 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband5/MiBand5Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband5/MiBand5Coordinator.java @@ -38,6 +38,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband5.MiBand5Support; public class MiBand5Coordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile(HuamiConst.MI_BAND5_NAME, Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband6/MiBand6Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband6/MiBand6Coordinator.java index 1ce6a3736..d158c6872 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband6/MiBand6Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband6/MiBand6Coordinator.java @@ -22,9 +22,6 @@ import android.net.Uri; import androidx.annotation.NonNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; @@ -42,7 +39,11 @@ 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); + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } @Override protected Pattern getSupportedDeviceName() { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband7/MiBand7Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband7/MiBand7Coordinator.java index 8cf6a2453..3dc14461e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband7/MiBand7Coordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband7/MiBand7Coordinator.java @@ -28,6 +28,12 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinat import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; public class MiBand7Coordinator extends ZeppOsCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Xiaomi"; + } + @Override public String getDeviceBluetoothName() { return HuamiConst.XIAOMI_SMART_BAND7_NAME; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppe/ZeppECoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppe/ZeppECoordinator.java index de270d718..4a2f6a341 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppe/ZeppECoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppe/ZeppECoordinator.java @@ -35,6 +35,12 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport; import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppe.ZeppESupport; public class ZeppECoordinator extends HuamiCoordinator { + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected Pattern getSupportedDeviceName() { return Pattern.compile("Zepp E", Pattern.CASE_INSENSITIVE); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppos/ZeppOsCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppos/ZeppOsCoordinator.java index 8c149bfcc..a76ef7a64 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppos/ZeppOsCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/zeppos/ZeppOsCoordinator.java @@ -84,6 +84,12 @@ public abstract class ZeppOsCoordinator extends HuamiCoordinator { return Collections.emptyMap(); } + @Override + public String getManufacturer() { + // Actual manufacturer is Huami + return "Amazfit"; + } + @Override protected final Pattern getSupportedDeviceName() { // Most devices use the exact bluetooth name diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiCompositionScaleCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiCompositionScaleCoordinator.java index ad5c61d2c..2ae348dac 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiCompositionScaleCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiCompositionScaleCoordinator.java @@ -80,7 +80,8 @@ public class MiCompositionScaleCoordinator extends AbstractBLEDeviceCoordinator @Override public String getManufacturer() { - return "Huami"; + // Actual manufacturer is Huami + return "Xiaomi"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiSmartScaleCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiSmartScaleCoordinator.java index 6ff795f0e..96b8848d9 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiSmartScaleCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miscale/MiSmartScaleCoordinator.java @@ -37,7 +37,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.miscale.MiSmartScale public class MiSmartScaleCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "Huami"; + // Actual manufacturer is Huami + return "Xiaomi"; } @Override diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/scannable/ScannableDeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/scannable/ScannableDeviceCoordinator.java index 5b5d7dd47..a3ba837b2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/scannable/ScannableDeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/scannable/ScannableDeviceCoordinator.java @@ -37,7 +37,7 @@ public class ScannableDeviceCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "unknown"; + return "Generic"; } @NonNull diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/soflow/SoFlowCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/soflow/SoFlowCoordinator.java index ab7158b91..cd42ae80e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/soflow/SoFlowCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/soflow/SoFlowCoordinator.java @@ -86,7 +86,7 @@ public class SoFlowCoordinator extends AbstractBLEDeviceCoordinator { @Override public String getManufacturer() { - return "SoFlow AG"; + return "SoFlow"; } @Override