mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei: Rename HuaweiCoordinatorSupplier to HuaweiCoordinator
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiBRSupport;
|
||||
|
||||
public abstract class HuaweiBRCoordinator extends HuaweiCoordinatorSupplier {
|
||||
public abstract class HuaweiBRCoordinator extends HuaweiCoordinator {
|
||||
@Override
|
||||
public ConnectionType getConnectionType() {
|
||||
return ConnectionType.BT_CLASSIC;
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.TemperatureSample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.heartratezones.HeartRateZonesSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiWorkoutGbParser;
|
||||
|
||||
public abstract class HuaweiCoordinatorSupplier extends AbstractDeviceCoordinator {
|
||||
public abstract class HuaweiCoordinator extends AbstractDeviceCoordinator {
|
||||
|
||||
public enum HuaweiDeviceType {
|
||||
AW(0), //BLE behind
|
||||
+1
-1
@@ -23,7 +23,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiLESupport;
|
||||
|
||||
public abstract class HuaweiLECoordinator extends HuaweiCoordinatorSupplier {
|
||||
public abstract class HuaweiLECoordinator extends HuaweiCoordinator {
|
||||
@Override
|
||||
public ConnectionType getConnectionType() {
|
||||
return ConnectionType.BLE;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCrypto;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiPacket;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiUtil;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinatorSupplier.HuaweiDeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinator.HuaweiDeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV.TLV;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
|
||||
|
||||
+6
-6
@@ -66,9 +66,9 @@ import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventDisplayMes
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCompatTemperatureSampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinatorSupplier;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiState;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinatorSupplier.HuaweiDeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinator.HuaweiDeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCrypto;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiDeviceStateManager;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiDictTypes;
|
||||
@@ -266,7 +266,7 @@ public class HuaweiSupportProvider {
|
||||
|
||||
private GBDevice gbDevice;
|
||||
private Context context;
|
||||
private HuaweiCoordinatorSupplier.HuaweiDeviceType huaweiType;
|
||||
private HuaweiCoordinator.HuaweiDeviceType huaweiType;
|
||||
|
||||
private final Handler handler = new Handler(Looper.getMainLooper());
|
||||
private final Runnable batteryRunner = () -> {
|
||||
@@ -333,8 +333,8 @@ public class HuaweiSupportProvider {
|
||||
|
||||
HuaweiStressCalibration stressCalibration = null;
|
||||
|
||||
public HuaweiCoordinatorSupplier getCoordinator() {
|
||||
return ((HuaweiCoordinatorSupplier) this.gbDevice.getDeviceCoordinator());
|
||||
public HuaweiCoordinator getCoordinator() {
|
||||
return ((HuaweiCoordinator) this.gbDevice.getDeviceCoordinator());
|
||||
}
|
||||
|
||||
public HuaweiState getDeviceState() {
|
||||
@@ -803,7 +803,7 @@ public class HuaweiSupportProvider {
|
||||
paramsProvider.setSecretKey(authKey);
|
||||
}
|
||||
|
||||
public HuaweiCoordinatorSupplier.HuaweiDeviceType getHuaweiType() {
|
||||
public HuaweiCoordinator.HuaweiDeviceType getHuaweiType() {
|
||||
return this.huaweiType;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.huawei.packets;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinatorSupplier;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiCrypto;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiPacket;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiTLV;
|
||||
@@ -85,7 +85,7 @@ public class TestDeviceConfig {
|
||||
|
||||
byte[] serialized = new byte[] {(byte) 0x5a, (byte) 0x00, (byte) 0x0b, (byte) 0x00, (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x04, (byte) 0x00, (byte) 0xf1, (byte) 0x3b};
|
||||
DeviceConfig.LinkParams.Request request = new DeviceConfig.LinkParams.Request(
|
||||
secretsProvider, HuaweiCoordinatorSupplier.HuaweiDeviceType.BLE
|
||||
secretsProvider, HuaweiCoordinator.HuaweiDeviceType.BLE
|
||||
);
|
||||
|
||||
Assert.assertEquals(0x01, request.serviceId);
|
||||
@@ -350,7 +350,7 @@ public class TestDeviceConfig {
|
||||
// Outdated
|
||||
//byte[] serialized = new byte[] {(byte) 0x5A, (byte) 0x00, (byte) 0x3A, (byte) 0x00, (byte) 0x01, (byte) 0x07, (byte) 0x7C, (byte) 0x01, (byte) 0x01, (byte) 0x7D, (byte) 0x10, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x7E, (byte) 0x20, (byte) 0x10, (byte) 0x9B, (byte) 0x27, (byte) 0x5D, (byte) 0xB1, (byte) 0x3C, (byte) 0xFD, (byte) 0x40, (byte) 0x4B, (byte) 0xA8, (byte) 0xAC, (byte) 0xAF, (byte) 0x8A, (byte) 0xB6, (byte) 0xA5, (byte) 0x3D, (byte) 0x40, (byte) 0x30, (byte) 0x2C, (byte) 0x79, (byte) 0x98, (byte) 0x6D, (byte) 0xEC, (byte) 0xD1, (byte) 0x39, (byte) 0xE6, (byte) 0xFE, (byte) 0x5C, (byte) 0xE8, (byte) 0xB2, (byte) 0xF3, (byte) 0x9E, (byte) 0x3E, (byte) 0x1B};
|
||||
DeviceConfig.ProductInfo.Request request = new DeviceConfig.ProductInfo.Request (
|
||||
secretsProvider, HuaweiCoordinatorSupplier.HuaweiDeviceType.BLE
|
||||
secretsProvider, HuaweiCoordinator.HuaweiDeviceType.BLE
|
||||
);
|
||||
|
||||
Assert.assertEquals(0x01, request.serviceId);
|
||||
|
||||
Reference in New Issue
Block a user