mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 08:05:55 +01:00
Make all Zepp OS classes explicit
There are still some actual "Huami 2021" classes that are used in non-ZeppOS devices, but this refactor improves the distinction.
This commit is contained in:
parent
86461ada1a
commit
773132c4e1
@ -22,15 +22,15 @@ import android.net.Uri;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitactive.AmazfitActiveSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitactive.AmazfitActiveSupport;
|
||||||
|
|
||||||
public class AmazfitActiveCoordinator extends Huami2021Coordinator {
|
public class AmazfitActiveCoordinator extends ZeppOsCoordinator {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||||
@ -49,7 +49,7 @@ public class AmazfitActiveCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitActiveFWInstallHandler(uri, context);
|
return new AmazfitActiveFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitActiveFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitActiveFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitActiveFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitActiveFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,14 @@ import androidx.annotation.NonNull;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitactiveedge.AmazfitActiveEdgeSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitactiveedge.AmazfitActiveEdgeSupport;
|
||||||
|
|
||||||
public class AmazfitActiveEdgeCoordinator extends Huami2021Coordinator {
|
public class AmazfitActiveEdgeCoordinator extends ZeppOsCoordinator {
|
||||||
@Override
|
@Override
|
||||||
public boolean isExperimental() {
|
public boolean isExperimental() {
|
||||||
return true;
|
return true;
|
||||||
@ -54,7 +54,7 @@ public class AmazfitActiveEdgeCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitActiveEdgeFWInstallHandler(uri, context);
|
return new AmazfitActiveEdgeFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitActiveEdgeFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitActiveEdgeFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitActiveEdgeFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitActiveEdgeFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,14 @@ import androidx.annotation.NonNull;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbalance.AmazfitBalanceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbalance.AmazfitBalanceSupport;
|
||||||
|
|
||||||
public class AmazfitBalanceCoordinator extends Huami2021Coordinator {
|
public class AmazfitBalanceCoordinator extends ZeppOsCoordinator {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
public Class<? extends DeviceSupport> getDeviceSupportClass() {
|
||||||
@ -49,7 +49,7 @@ public class AmazfitBalanceCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitBalanceFWInstallHandler(uri, context);
|
return new AmazfitBalanceFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitBalanceFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitBalanceFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitBalanceFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitBalanceFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband7.AmazfitBand7Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitband7.AmazfitBand7Support;
|
||||||
|
|
||||||
public class AmazfitBand7Coordinator extends Huami2021Coordinator {
|
public class AmazfitBand7Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBand7Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBand7Coordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -50,7 +48,7 @@ public class AmazfitBand7Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitBand7FWInstallHandler(uri, context);
|
return new AmazfitBand7FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitBand7FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitBand7FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitBand7FWInstallHandler(final Uri uri, final Context context) {
|
AmazfitBand7FWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip5.AmazfitBip5Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip5.AmazfitBip5Support;
|
||||||
|
|
||||||
public class AmazfitBip5Coordinator extends Huami2021Coordinator {
|
public class AmazfitBip5Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBip5Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitBip5Coordinator.class);
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -51,7 +49,7 @@ public class AmazfitBip5Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitBip5FWInstallHandler(uri, context);
|
return new AmazfitBip5FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitBip5FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitBip5FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitBip5FWInstallHandler(final Uri uri, final Context context) {
|
AmazfitBip5FWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahpro.AmazfitCheetahProSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahpro.AmazfitCheetahProSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahProCoordinator extends Huami2021Coordinator {
|
public class AmazfitCheetahProCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahProCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahProCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +54,7 @@ public class AmazfitCheetahProCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitCheetahProFWInstallHandler(uri, context);
|
return new AmazfitCheetahProFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitCheetahProFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitCheetahProFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitCheetahProFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitCheetahProFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahround.AmazfitCheetahRoundSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahround.AmazfitCheetahRoundSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahRoundCoordinator extends Huami2021Coordinator {
|
public class AmazfitCheetahRoundCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahRoundCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahRoundCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -61,7 +59,7 @@ public class AmazfitCheetahRoundCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitCheetahRoundFWInstallHandler(uri, context);
|
return new AmazfitCheetahRoundFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitCheetahRoundFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitCheetahRoundFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitCheetahRoundFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitCheetahRoundFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahSquareCoordinator extends Huami2021Coordinator {
|
public class AmazfitCheetahSquareCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahSquareCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitCheetahSquareCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +54,7 @@ public class AmazfitCheetahSquareCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitCheetahSquareFWInstallHandler(uri, context);
|
return new AmazfitCheetahSquareFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitCheetahSquareFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitCheetahSquareFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitCheetahSquareFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitCheetahSquareFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitfalcon.AmazfitFalconSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitfalcon.AmazfitFalconSupport;
|
||||||
|
|
||||||
public class AmazfitFalconCoordinator extends Huami2021Coordinator {
|
public class AmazfitFalconCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitFalconCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitFalconCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -61,7 +59,7 @@ public class AmazfitFalconCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitFalconFWInstallHandler(uri, context);
|
return new AmazfitFalconFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitFalconFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitFalconFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitFalconFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitFalconFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -25,16 +25,15 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3.AmazfitGTR3Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3.AmazfitGTR3Support;
|
||||||
|
|
||||||
public class AmazfitGTR3Coordinator extends Huami2021Coordinator {
|
public class AmazfitGTR3Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3Coordinator.class);
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -64,7 +63,7 @@ public class AmazfitGTR3Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTR3FWInstallHandler(uri, context);
|
return new AmazfitGTR3FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTR3FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTR3FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTR3FWInstallHandler(Uri uri, Context context) {
|
AmazfitGTR3FWInstallHandler(Uri uri, Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3pro.AmazfitGTR3ProSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr3pro.AmazfitGTR3ProSupport;
|
||||||
|
|
||||||
public class AmazfitGTR3ProCoordinator extends Huami2021Coordinator {
|
public class AmazfitGTR3ProCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +54,7 @@ public class AmazfitGTR3ProCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTR3ProFWInstallHandler(uri, context);
|
return new AmazfitGTR3ProFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTR3ProFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTR3ProFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTR3ProFWInstallHandler(Uri uri, Context context) {
|
AmazfitGTR3ProFWInstallHandler(Uri uri, Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr4.AmazfitGTR4Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr4.AmazfitGTR4Support;
|
||||||
|
|
||||||
public class AmazfitGTR4Coordinator extends Huami2021Coordinator {
|
public class AmazfitGTR4Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR4Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR4Coordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +54,7 @@ public class AmazfitGTR4Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTR4FWInstallHandler(uri, context);
|
return new AmazfitGTR4FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTR4FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTR4FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTR4FWInstallHandler(final Uri uri, final Context context) {
|
AmazfitGTR4FWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtrmini.AmazfitGTRMiniSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtrmini.AmazfitGTRMiniSupport;
|
||||||
|
|
||||||
public class AmazfitGTRMiniCoordinator extends Huami2021Coordinator {
|
public class AmazfitGTRMiniCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRMiniCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRMiniCoordinator.class);
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -56,7 +54,7 @@ public class AmazfitGTRMiniCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTRMiniFWInstallHandler(uri, context);
|
return new AmazfitGTRMiniFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTRMiniFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTRMiniFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTRMiniFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitGTRMiniFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts3.AmazfitGTS3Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts3.AmazfitGTS3Support;
|
||||||
|
|
||||||
public class AmazfitGTS3Coordinator extends Huami2021Coordinator {
|
public class AmazfitGTS3Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3Coordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -51,7 +49,7 @@ public class AmazfitGTS3Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTS3FWInstallHandler(uri, context);
|
return new AmazfitGTS3FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTS3FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTS3FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTS3FWInstallHandler(Uri uri, Context context) {
|
AmazfitGTS3FWInstallHandler(Uri uri, Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -25,15 +25,15 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4.AmazfitGTS4Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4.AmazfitGTS4Support;
|
||||||
|
|
||||||
public class AmazfitGTS4Coordinator extends Huami2021Coordinator {
|
public class AmazfitGTS4Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4Coordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,7 +57,7 @@ public class AmazfitGTS4Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTS4FWInstallHandler(uri, context);
|
return new AmazfitGTS4FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTS4FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTS4FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTS4FWInstallHandler(final Uri uri, final Context context) {
|
AmazfitGTS4FWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4mini.AmazfitGTS4MiniSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts4mini.AmazfitGTS4MiniSupport;
|
||||||
|
|
||||||
public class AmazfitGTS4MiniCoordinator extends Huami2021Coordinator {
|
public class AmazfitGTS4MiniCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4MiniCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS4MiniCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -51,7 +49,7 @@ public class AmazfitGTS4MiniCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitGTS4MiniFWInstallHandler(uri, context);
|
return new AmazfitGTS4MiniFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitGTS4MiniFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitGTS4MiniFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitGTS4MiniFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitGTS4MiniFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex2.AmazfitTRex2Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrex2.AmazfitTRex2Support;
|
||||||
|
|
||||||
public class AmazfitTRex2Coordinator extends Huami2021Coordinator {
|
public class AmazfitTRex2Coordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRex2Coordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRex2Coordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +54,7 @@ public class AmazfitTRex2Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitTRex2FWInstallHandler(uri, context);
|
return new AmazfitTRex2FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitTRex2FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitTRex2FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitTRex2FWInstallHandler(final Uri uri, final Context context) {
|
AmazfitTRex2FWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
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.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexultra.AmazfitTRexUltraSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfittrexultra.AmazfitTRexUltraSupport;
|
||||||
|
|
||||||
public class AmazfitTRexUltraCoordinator extends Huami2021Coordinator {
|
public class AmazfitTRexUltraCoordinator extends ZeppOsCoordinator {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRexUltraCoordinator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitTRexUltraCoordinator.class);
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -56,7 +54,7 @@ public class AmazfitTRexUltraCoordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new AmazfitTRexUltraFWInstallHandler(uri, context);
|
return new AmazfitTRexUltraFWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class AmazfitTRexUltraFWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class AmazfitTRexUltraFWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
AmazfitTRexUltraFWInstallHandler(final Uri uri, final Context context) {
|
AmazfitTRexUltraFWInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,15 @@ import android.net.Uri;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7.MiBand7Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7.MiBand7Support;
|
||||||
|
|
||||||
public class MiBand7Coordinator extends Huami2021Coordinator {
|
public class MiBand7Coordinator extends ZeppOsCoordinator {
|
||||||
@Override
|
@Override
|
||||||
public boolean supports(final GBDeviceCandidate candidate) {
|
public boolean supports(final GBDeviceCandidate candidate) {
|
||||||
final String name = candidate.getName();
|
final String name = candidate.getName();
|
||||||
@ -38,7 +38,7 @@ public class MiBand7Coordinator extends Huami2021Coordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context) {
|
||||||
return new MiBand7FWInstallHandler(uri, context);
|
return new MiBand7FWInstallHandler(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
|
|
||||||
class MiBand7FWInstallHandler extends AbstractHuami2021FWInstallHandler {
|
class MiBand7FWInstallHandler extends AbstractZeppOsFwInstallHandler {
|
||||||
MiBand7FWInstallHandler(Uri uri, Context context) {
|
MiBand7FWInstallHandler(Uri uri, Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos;
|
||||||
|
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryEntries.*;
|
import static nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryEntries.*;
|
||||||
|
|
||||||
@ -26,19 +26,20 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiActivitySummaryParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.proto.HuamiProtos;
|
import nodomain.freeyourgadget.gadgetbridge.proto.HuamiProtos;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary;
|
import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiActivityDetailsParser;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiActivityDetailsParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021ActivityDetailsParser;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsActivityDetailsParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021WorkoutTrackActivityType;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsActivityType;
|
||||||
|
|
||||||
public class Huami2021ActivitySummaryParser extends HuamiActivitySummaryParser {
|
public class ZeppOsActivitySummaryParser extends HuamiActivitySummaryParser {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021ActivitySummaryParser.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsActivitySummaryParser.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractHuamiActivityDetailsParser getDetailsParser(final BaseActivitySummary summary) {
|
public AbstractHuamiActivityDetailsParser getDetailsParser(final BaseActivitySummary summary) {
|
||||||
return new Huami2021ActivityDetailsParser(summary);
|
return new ZeppOsActivityDetailsParser(summary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -59,12 +60,12 @@ public class Huami2021ActivitySummaryParser extends HuamiActivitySummaryParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (summaryProto.hasType()) {
|
if (summaryProto.hasType()) {
|
||||||
final Huami2021WorkoutTrackActivityType workoutTrackActivityType = Huami2021WorkoutTrackActivityType
|
final ZeppOsActivityType activityType = ZeppOsActivityType
|
||||||
.fromCode((byte) summaryProto.getType().getType());
|
.fromCode((byte) summaryProto.getType().getType());
|
||||||
|
|
||||||
final int activityKind;
|
final int activityKind;
|
||||||
if (workoutTrackActivityType != null) {
|
if (activityType != null) {
|
||||||
activityKind = workoutTrackActivityType.toActivityKind();
|
activityKind = activityType.toActivityKind();
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Unknown workout activity type code {}", String.format("0x%X", summaryProto.getType().getType()));
|
LOG.warn("Unknown workout activity type code {}", String.format("0x%X", summaryProto.getType().getType()));
|
||||||
activityKind = ActivityKind.TYPE_UNKNOWN;
|
activityKind = ActivityKind.TYPE_UNKNOWN;
|
@ -30,11 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.activities.InstallActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.InstallActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.GenericItem;
|
import nodomain.freeyourgadget.gadgetbridge.model.GenericItem;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsAgpsFile;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsAgpsFile;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.UriHelper;
|
import nodomain.freeyourgadget.gadgetbridge.util.UriHelper;
|
||||||
|
|
||||||
@ -80,14 +78,14 @@ public class ZeppOsAgpsInstallHandler implements InstallHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||||
if (!(coordinator instanceof Huami2021Coordinator)) {
|
if (!(coordinator instanceof ZeppOsCoordinator)) {
|
||||||
LOG.warn("Coordinator is not a Huami2021Coordinator: {}", coordinator.getClass());
|
LOG.warn("Coordinator is not a ZeppOsCoordinator: {}", coordinator.getClass());
|
||||||
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
||||||
installActivity.setInstallEnabled(false);
|
installActivity.setInstallEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Huami2021Coordinator huami2021coordinator = (Huami2021Coordinator) coordinator;
|
final ZeppOsCoordinator zeppOsCoordinator = (ZeppOsCoordinator) coordinator;
|
||||||
if (!huami2021coordinator.supportsAgpsUpdates()) {
|
if (!zeppOsCoordinator.supportsAgpsUpdates()) {
|
||||||
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
||||||
installActivity.setInstallEnabled(false);
|
installActivity.setInstallEnabled(false);
|
||||||
return;
|
return;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -39,8 +39,8 @@ import nodomain.freeyourgadget.gadgetbridge.capabilities.password.PasswordCapabi
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsAgpsInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsGpxRouteInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiExtendedSampleProvider;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample;
|
import nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||||
@ -54,7 +54,7 @@ import nodomain.freeyourgadget.gadgetbridge.entities.HuamiSpo2SampleDao;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.entities.HuamiStressSampleDao;
|
import nodomain.freeyourgadget.gadgetbridge.entities.HuamiStressSampleDao;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryParser;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuami2021FWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsFwInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAlexaService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAlexaService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsContactsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsContactsService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsLogsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsLogsService;
|
||||||
@ -68,8 +68,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.service
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
|
|
||||||
public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
public abstract class ZeppOsCoordinator extends HuamiCoordinator {
|
||||||
public abstract AbstractHuami2021FWInstallHandler createFwInstallHandler(final Uri uri, final Context context);
|
public abstract AbstractZeppOsFwInstallHandler createFwInstallHandler(final Uri uri, final Context context);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InstallHandler findInstallHandler(final Uri uri, final Context context) {
|
public InstallHandler findInstallHandler(final Uri uri, final Context context) {
|
||||||
@ -87,7 +87,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final AbstractHuami2021FWInstallHandler handler = createFwInstallHandler(uri, context);
|
final AbstractZeppOsFwInstallHandler handler = createFwInstallHandler(uri, context);
|
||||||
return handler.isValid() ? handler : null;
|
return handler.isValid() ? handler : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActivitySummaryParser getActivitySummaryParser(final GBDevice device) {
|
public ActivitySummaryParser getActivitySummaryParser(final GBDevice device) {
|
||||||
return new Huami2021ActivitySummaryParser();
|
return new ZeppOsActivitySummaryParser();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -313,7 +313,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a superset of all settings supported by Zepp OS Devices. Unsupported settings are removed
|
* Returns a superset of all settings supported by Zepp OS Devices. Unsupported settings are removed
|
||||||
* by {@link Huami2021SettingsCustomizer}.
|
* by {@link ZeppOsSettingsCustomizer}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int[] getSupportedDeviceSpecificSettings(final GBDevice device) {
|
public int[] getSupportedDeviceSpecificSettings(final GBDevice device) {
|
||||||
@ -491,7 +491,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
|
public DeviceSpecificSettingsCustomizer getDeviceSpecificSettingsCustomizer(final GBDevice device) {
|
||||||
return new Huami2021SettingsCustomizer(device, getVibrationPatternNotificationTypes(device));
|
return new ZeppOsSettingsCustomizer(device, getVibrationPatternNotificationTypes(device));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -30,11 +30,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.activities.InstallActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.InstallActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.GenericItem;
|
import nodomain.freeyourgadget.gadgetbridge.model.GenericItem;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsGpxRouteFile;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsGpxRouteFile;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.UriHelper;
|
import nodomain.freeyourgadget.gadgetbridge.util.UriHelper;
|
||||||
|
|
||||||
@ -79,14 +77,14 @@ public class ZeppOsGpxRouteInstallHandler implements InstallHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||||
if (!(coordinator instanceof Huami2021Coordinator)) {
|
if (!(coordinator instanceof ZeppOsCoordinator)) {
|
||||||
LOG.warn("Coordinator is not a Huami2021Coordinator: {}", coordinator.getClass());
|
LOG.warn("Coordinator is not a ZeppOsCoordinator: {}", coordinator.getClass());
|
||||||
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
||||||
installActivity.setInstallEnabled(false);
|
installActivity.setInstallEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Huami2021Coordinator huami2021coordinator = (Huami2021Coordinator) coordinator;
|
final ZeppOsCoordinator zeppOsCoordinator = (ZeppOsCoordinator) coordinator;
|
||||||
if (!huami2021coordinator.supportsGpxUploads()) {
|
if (!zeppOsCoordinator.supportsGpxUploads()) {
|
||||||
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
installActivity.setInfoText(mContext.getString(R.string.fwapp_install_device_not_supported));
|
||||||
installActivity.setInstallEnabled(false);
|
installActivity.setInstallEnabled(false);
|
||||||
return;
|
return;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos;
|
||||||
|
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils.hidePrefIfNoneVisible;
|
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils.hidePrefIfNoneVisible;
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils.populateOrHideListPreference;
|
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils.populateOrHideListPreference;
|
||||||
@ -44,15 +44,17 @@ import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSett
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsHandler;
|
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettingsHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsConst;
|
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.capabilities.GpsCapability;
|
import nodomain.freeyourgadget.gadgetbridge.capabilities.GpsCapability;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiSettingsCustomizer;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiVibrationPatternNotificationType;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiVibrationPatternNotificationType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsConfigService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsConfigService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
|
|
||||||
public class Huami2021SettingsCustomizer extends HuamiSettingsCustomizer {
|
public class ZeppOsSettingsCustomizer extends HuamiSettingsCustomizer {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021SettingsCustomizer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsSettingsCustomizer.class);
|
||||||
|
|
||||||
public Huami2021SettingsCustomizer(final GBDevice device, final List<HuamiVibrationPatternNotificationType> vibrationPatternNotificationTypes) {
|
public ZeppOsSettingsCustomizer(final GBDevice device, final List<HuamiVibrationPatternNotificationType> vibrationPatternNotificationTypes) {
|
||||||
super(device, vibrationPatternNotificationTypes);
|
super(device, vibrationPatternNotificationTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,18 +440,18 @@ public class Huami2021SettingsCustomizer extends HuamiSettingsCustomizer {
|
|||||||
DeviceSettingsUtils.enforceMinMax((EditTextPreference) pref, minValue, maxValue);
|
DeviceSettingsUtils.enforceMinMax((EditTextPreference) pref, minValue, maxValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<Huami2021SettingsCustomizer> CREATOR = new Creator<Huami2021SettingsCustomizer>() {
|
public static final Creator<ZeppOsSettingsCustomizer> CREATOR = new Creator<ZeppOsSettingsCustomizer>() {
|
||||||
@Override
|
@Override
|
||||||
public Huami2021SettingsCustomizer createFromParcel(final Parcel in) {
|
public ZeppOsSettingsCustomizer createFromParcel(final Parcel in) {
|
||||||
final GBDevice device = in.readParcelable(Huami2021SettingsCustomizer.class.getClassLoader());
|
final GBDevice device = in.readParcelable(ZeppOsSettingsCustomizer.class.getClassLoader());
|
||||||
final List<HuamiVibrationPatternNotificationType> vibrationPatternNotificationTypes = new ArrayList<>();
|
final List<HuamiVibrationPatternNotificationType> vibrationPatternNotificationTypes = new ArrayList<>();
|
||||||
in.readList(vibrationPatternNotificationTypes, HuamiVibrationPatternNotificationType.class.getClassLoader());
|
in.readList(vibrationPatternNotificationTypes, HuamiVibrationPatternNotificationType.class.getClassLoader());
|
||||||
return new Huami2021SettingsCustomizer(device, vibrationPatternNotificationTypes);
|
return new ZeppOsSettingsCustomizer(device, vibrationPatternNotificationTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Huami2021SettingsCustomizer[] newArray(final int size) {
|
public ZeppOsSettingsCustomizer[] newArray(final int size) {
|
||||||
return new Huami2021SettingsCustomizer[size];
|
return new ZeppOsSettingsCustomizer[size];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -18,6 +18,7 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.AbstractMiBandOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.AbstractMiBandOperation;
|
||||||
|
|
||||||
public abstract class AbstractHuamiOperation extends AbstractMiBandOperation<HuamiSupport> {
|
public abstract class AbstractHuamiOperation extends AbstractMiBandOperation<HuamiSupport> {
|
||||||
@ -30,7 +31,7 @@ public abstract class AbstractHuamiOperation extends AbstractMiBandOperation<Hua
|
|||||||
// TODO: check which notifications we should disable and re-enable here
|
// TODO: check which notifications we should disable and re-enable here
|
||||||
// builder.notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS), enable)
|
// builder.notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS), enable)
|
||||||
// .notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_SENSOR_DATA), enable);
|
// .notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_SENSOR_DATA), enable);
|
||||||
if (getSupport() instanceof Huami2021Support) {
|
if (getSupport() instanceof ZeppOsSupport) {
|
||||||
// Disable 2021 chunked reads, otherwise firmware upgrades and activity sync get interrupted
|
// Disable 2021 chunked reads, otherwise firmware upgrades and activity sync get interrupted
|
||||||
builder.notify(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_CHUNKEDTRANSFER_2021_READ), enable);
|
builder.notify(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_CHUNKEDTRANSFER_2021_READ), enable);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.ActivateDisplayOnLift;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.ActivateDisplayOnLift;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.ActivateDisplayOnLiftSensitivity;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.ActivateDisplayOnLiftSensitivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.DisconnectNotificationSetting;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.DisconnectNotificationSetting;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||||
@ -1691,7 +1691,7 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
|
|||||||
this.fetchOperationQueue.add(new FetchSpo2NormalOperation(this));
|
this.fetchOperationQueue.add(new FetchSpo2NormalOperation(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Huami2021Coordinator.experimentalFeatures(getDevice())) {
|
if (ZeppOsCoordinator.experimentalFeatures(getDevice())) {
|
||||||
if ((dataTypes & RecordedDataTypes.TYPE_HEART_RATE) != 0 && coordinator.supportsHeartRateStats()) {
|
if ((dataTypes & RecordedDataTypes.TYPE_HEART_RATE) != 0 && coordinator.supportsHeartRateStats()) {
|
||||||
this.fetchOperationQueue.add(new FetchHeartRateManualOperation(this));
|
this.fetchOperationQueue.add(new FetchHeartRateManualOperation(this));
|
||||||
this.fetchOperationQueue.add(new FetchHeartRateMaxOperation(this));
|
this.fetchOperationQueue.add(new FetchHeartRateMaxOperation(this));
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitActiveFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitActiveFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitactive.AmazfitActiveFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitactive.AmazfitActiveFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitActiveSupport extends Huami2021Support {
|
public class AmazfitActiveSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitActiveFWHelper(uri, context);
|
return new AmazfitActiveFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitActiveEdgeFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitActiveEdgeFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitactiveedge.AmazfitActiveEdgeFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitactiveedge.AmazfitActiveEdgeFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitActiveEdgeSupport extends Huami2021Support {
|
public class AmazfitActiveEdgeSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitActiveEdgeFWHelper(uri, context);
|
return new AmazfitActiveEdgeFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitBalanceFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitBalanceFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbalance.AmazfitBalanceFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbalance.AmazfitBalanceFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitBalanceSupport extends Huami2021Support {
|
public class AmazfitBalanceSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitBalanceFWHelper(uri, context);
|
return new AmazfitBalanceFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitBand7FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitBand7FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitband7.AmazfitBand7FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitband7.AmazfitBand7FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitBand7Support extends Huami2021Support {
|
public class AmazfitBand7Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitBand7FWHelper(uri, context);
|
return new AmazfitBand7FWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitBip5FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitBip5FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip5.AmazfitBip5FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip5.AmazfitBip5FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitBip5Support extends Huami2021Support {
|
public class AmazfitBip5Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitBip5FWHelper(uri, context);
|
return new AmazfitBip5FWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitCheetahProFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitCheetahProFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahpro.AmazfitCheetahProFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahpro.AmazfitCheetahProFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahProSupport extends Huami2021Support {
|
public class AmazfitCheetahProSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitCheetahProFWHelper(uri, context);
|
return new AmazfitCheetahProFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitCheetahRoundFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitCheetahRoundFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahround.AmazfitCheetahRoundFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahround.AmazfitCheetahRoundFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahRoundSupport extends Huami2021Support {
|
public class AmazfitCheetahRoundSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitCheetahRoundFWHelper(uri, context);
|
return new AmazfitCheetahRoundFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitCheetahSquareFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitCheetahSquareFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitcheetahsquare.AmazfitCheetahSquareFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitCheetahSquareSupport extends Huami2021Support {
|
public class AmazfitCheetahSquareSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitCheetahSquareFWHelper(uri, context);
|
return new AmazfitCheetahSquareFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitFalconFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitFalconFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitfalcon.AmazfitFalconFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitfalcon.AmazfitFalconFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitFalconSupport extends Huami2021Support {
|
public class AmazfitFalconSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitFalconFWHelper(uri, context);
|
return new AmazfitFalconFWHelper(uri, context);
|
||||||
|
@ -28,9 +28,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTR3FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTR3FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3FirmwareInfo.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3FirmwareInfo.class);
|
||||||
|
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
|
@ -26,9 +26,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr3.AmazfitGTR3FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr3.AmazfitGTR3FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTR3Support extends Huami2021Support {
|
public class AmazfitGTR3Support extends ZeppOsSupport {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3Support.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3Support.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -28,9 +28,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTR3ProFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTR3ProFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProFirmwareInfo.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProFirmwareInfo.class);
|
||||||
|
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
|
@ -26,9 +26,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr3pro.AmazfitGTR3ProFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr3pro.AmazfitGTR3ProFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTR3ProSupport extends Huami2021Support {
|
public class AmazfitGTR3ProSupport extends ZeppOsSupport {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProSupport.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTR3ProSupport.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTR4FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTR4FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
put(1699, "3.17.0.2");
|
put(1699, "3.17.0.2");
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr4.AmazfitGTR4FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr4.AmazfitGTR4FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTR4Support extends Huami2021Support {
|
public class AmazfitGTR4Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitGTR4FWHelper(uri, context);
|
return new AmazfitGTR4FWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTRMiniFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTRMiniFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtrmini.AmazfitGTRMiniFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtrmini.AmazfitGTRMiniFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTRMiniSupport extends Huami2021Support {
|
public class AmazfitGTRMiniSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitGTRMiniFWHelper(uri, context);
|
return new AmazfitGTRMiniFWHelper(uri, context);
|
||||||
|
@ -28,9 +28,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTS3FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTS3FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3FirmwareInfo.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3FirmwareInfo.class);
|
||||||
|
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
|
@ -24,12 +24,11 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts3.AmazfitGTS3FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts3.AmazfitGTS3FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTS3Support extends Huami2021Support {
|
public class AmazfitGTS3Support extends ZeppOsSupport {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3Support.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTS3Support.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTS4FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTS4FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts4.AmazfitGTS4FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts4.AmazfitGTS4FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTS4Support extends Huami2021Support {
|
public class AmazfitGTS4Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitGTS4FWHelper(uri, context);
|
return new AmazfitGTS4FWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitGTS4MiniFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitGTS4MiniFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts4mini.AmazfitGTS4MiniFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgts4mini.AmazfitGTS4MiniFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitGTS4MiniSupport extends Huami2021Support {
|
public class AmazfitGTS4MiniSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitGTS4MiniFWHelper(uri, context);
|
return new AmazfitGTS4MiniFWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitTRex2FirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitTRex2FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex2.AmazfitTRex2FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex2.AmazfitTRex2FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitTRex2Support extends Huami2021Support {
|
public class AmazfitTRex2Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitTRex2FWHelper(uri, context);
|
return new AmazfitTRex2FWHelper(uri, context);
|
||||||
|
@ -25,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class AmazfitTRexUltraFirmwareInfo extends Huami2021FirmwareInfo {
|
public class AmazfitTRexUltraFirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
}};
|
}};
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexultra.AmazfitTRexUltraFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrexultra.AmazfitTRexUltraFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class AmazfitTRexUltraSupport extends Huami2021Support {
|
public class AmazfitTRexUltraSupport extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new AmazfitTRexUltraFWHelper(uri, context);
|
return new AmazfitTRexUltraFWHelper(uri, context);
|
||||||
|
@ -16,9 +16,6 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband7;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -28,9 +25,9 @@ import java.util.Set;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021FirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsFirmwareInfo;
|
||||||
|
|
||||||
public class MiBand7FirmwareInfo extends Huami2021FirmwareInfo {
|
public class MiBand7FirmwareInfo extends ZeppOsFirmwareInfo {
|
||||||
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
private static final Map<Integer, String> crcToVersion = new HashMap<Integer, String>() {{
|
||||||
// firmware
|
// firmware
|
||||||
put(26036, "1.20.3.1");
|
put(26036, "1.20.3.1");
|
||||||
|
@ -23,9 +23,9 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.miband7.MiBand7FWHelper;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.miband7.MiBand7FWHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
|
|
||||||
public class MiBand7Support extends Huami2021Support {
|
public class MiBand7Support extends ZeppOsSupport {
|
||||||
@Override
|
@Override
|
||||||
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
public HuamiFWHelper createFWHelper(final Uri uri, final Context context) throws IOException {
|
||||||
return new MiBand7FWHelper(uri, context);
|
return new MiBand7FWHelper(uri, context);
|
||||||
|
@ -45,7 +45,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.AbstractGattListenerWriteAction;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.AbstractGattListenerWriteAction;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceBusyAction;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceBusyAction;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||||
@ -163,7 +163,7 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates that the received data has the expected checksum. Only
|
* Validates that the received data has the expected checksum. Only
|
||||||
* relevant for Huami2021Support devices.
|
* relevant for ZeppOsSupport devices.
|
||||||
*
|
*
|
||||||
* @param crc32 the expected checksum
|
* @param crc32 the expected checksum
|
||||||
* @return whether the checksum was valid
|
* @return whether the checksum was valid
|
||||||
@ -187,7 +187,7 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
|
|||||||
protected void startFetching(TransactionBuilder builder, byte fetchType, GregorianCalendar sinceWhen) {
|
protected void startFetching(TransactionBuilder builder, byte fetchType, GregorianCalendar sinceWhen) {
|
||||||
final String taskName = StringUtils.ensureNotNull(builder.getTaskName());
|
final String taskName = StringUtils.ensureNotNull(builder.getTaskName());
|
||||||
final HuamiSupport support = getSupport();
|
final HuamiSupport support = getSupport();
|
||||||
final boolean isHuami2021 = support instanceof Huami2021Support;
|
final boolean isZeppOs = support instanceof ZeppOsSupport;
|
||||||
byte[] fetchBytes = BLETypeConversions.join(new byte[]{
|
byte[] fetchBytes = BLETypeConversions.join(new byte[]{
|
||||||
HuamiService.COMMAND_ACTIVITY_DATA_START_DATE,
|
HuamiService.COMMAND_ACTIVITY_DATA_START_DATE,
|
||||||
fetchType},
|
fetchType},
|
||||||
@ -201,9 +201,9 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
|
|||||||
|
|
||||||
if (ArrayUtils.equals(value, HuamiService.RESPONSE_ACTIVITY_DATA_START_DATE_SUCCESS, 0)) {
|
if (ArrayUtils.equals(value, HuamiService.RESPONSE_ACTIVITY_DATA_START_DATE_SUCCESS, 0)) {
|
||||||
handleActivityMetadata(value);
|
handleActivityMetadata(value);
|
||||||
if (expectedDataLength == 0 && isHuami2021) {
|
if (expectedDataLength == 0 && isZeppOs) {
|
||||||
// Nothing to receive, if we try to fetch data it will fail
|
// Nothing to receive, if we try to fetch data it will fail
|
||||||
sendAck2021(true);
|
sendAckZeppOs(true);
|
||||||
} else if (expectedDataLength != 0) {
|
} else if (expectedDataLength != 0) {
|
||||||
TransactionBuilder newBuilder = createTransactionBuilder(taskName + " Step 2");
|
TransactionBuilder newBuilder = createTransactionBuilder(taskName + " Step 2");
|
||||||
newBuilder.notify(characteristicActivityData, true);
|
newBuilder.notify(characteristicActivityData, true);
|
||||||
@ -305,7 +305,7 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
|
|||||||
if (value.length == 7 && !validChecksum(BLETypeConversions.toUint32(value, 3))) {
|
if (value.length == 7 && !validChecksum(BLETypeConversions.toUint32(value, 3))) {
|
||||||
LOG.warn("Data checksum invalid");
|
LOG.warn("Data checksum invalid");
|
||||||
handleActivityFetchFinish(false);
|
handleActivityFetchFinish(false);
|
||||||
sendAck2021(true);
|
sendAckZeppOs(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,15 +319,15 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
|
|||||||
|
|
||||||
final boolean keepActivityDataOnDevice = HuamiCoordinator.getKeepActivityDataOnDevice(getDevice().getAddress());
|
final boolean keepActivityDataOnDevice = HuamiCoordinator.getKeepActivityDataOnDevice(getDevice().getAddress());
|
||||||
|
|
||||||
sendAck2021(keepActivityDataOnDevice || !handleFinishSuccess);
|
sendAckZeppOs(keepActivityDataOnDevice || !handleFinishSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendAck2021(final boolean keepDataOnDevice) {
|
protected void sendAckZeppOs(final boolean keepDataOnDevice) {
|
||||||
if (!(getSupport() instanceof Huami2021Support)) {
|
if (!(getSupport() instanceof ZeppOsSupport)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.debug("Sending ack 2021, keepDataOnDevice = {}", keepDataOnDevice);
|
LOG.debug("Sending Zepp OS ack, keepDataOnDevice = {}", keepDataOnDevice);
|
||||||
|
|
||||||
// 0x01 to ACK, mark as saved on phone (drop from band)
|
// 0x01 to ACK, mark as saved on phone (drop from band)
|
||||||
// 0x09 to ACK, but keep it marked as not saved
|
// 0x09 to ACK, but keep it marked as not saved
|
||||||
|
@ -82,7 +82,7 @@ public abstract class AbstractRepeatingFetchOperation extends AbstractFetchOpera
|
|||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
// We need to explicitly ack this, or the next operation will fail fetch will become stuck
|
// We need to explicitly ack this, or the next operation will fail fetch will become stuck
|
||||||
sendAck2021(true);
|
sendAckZeppOs(true);
|
||||||
super.handleActivityFetchFinish(false);
|
super.handleActivityFetchFinish(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ public abstract class AbstractRepeatingFetchOperation extends AbstractFetchOpera
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
final boolean keepActivityDataOnDevice = HuamiCoordinator.getKeepActivityDataOnDevice(getDevice().getAddress());
|
final boolean keepActivityDataOnDevice = HuamiCoordinator.getKeepActivityDataOnDevice(getDevice().getAddress());
|
||||||
sendAck2021(keepActivityDataOnDevice);
|
sendAckZeppOs(keepActivityDataOnDevice);
|
||||||
startFetching();
|
startFetching();
|
||||||
return true;
|
return true;
|
||||||
} catch (final IOException ex) {
|
} catch (final IOException ex) {
|
||||||
|
@ -34,7 +34,6 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.database.DBHelper;
|
import nodomain.freeyourgadget.gadgetbridge.database.DBHelper;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021ActivitySummaryParser;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiActivitySummaryParser;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiActivitySummaryParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipService;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary;
|
import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary;
|
||||||
@ -44,10 +43,8 @@ import nodomain.freeyourgadget.gadgetbridge.entities.User;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryParser;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySummaryParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiActivityDetailsParser;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiActivityDetailsParser;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021ActivityDetailsParser;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.CheckSums;
|
import nodomain.freeyourgadget.gadgetbridge.util.CheckSums;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,14 +28,14 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiFirmwareInfo;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiFirmwareInfo;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiFirmwareType;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiFirmwareType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
||||||
|
|
||||||
public class UpdateFirmwareOperation2021 extends UpdateFirmwareOperation2020 {
|
public class UpdateFirmwareOperation2021 extends UpdateFirmwareOperation2020 {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(UpdateFirmwareOperation2021.class);
|
private static final Logger LOG = LoggerFactory.getLogger(UpdateFirmwareOperation2021.class);
|
||||||
|
|
||||||
public UpdateFirmwareOperation2021(final Uri uri, final Huami2021Support support) {
|
public UpdateFirmwareOperation2021(final Uri uri, final ZeppOsSupport support) {
|
||||||
super(uri, support);
|
super(uri, support);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,8 +62,8 @@ public class UpdateFirmwareOperation2021 extends UpdateFirmwareOperation2020 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Huami2021Support getSupport() {
|
public ZeppOsSupport getSupport() {
|
||||||
return (Huami2021Support) super.getSupport();
|
return (ZeppOsSupport) super.getSupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -36,13 +36,13 @@ import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWInstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWInstallHandler;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiFirmwareInfo;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||||
|
|
||||||
public abstract class AbstractHuami2021FWInstallHandler extends AbstractMiBandFWInstallHandler {
|
public abstract class AbstractZeppOsFwInstallHandler extends AbstractMiBandFWInstallHandler {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractHuami2021FWInstallHandler.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractZeppOsFwInstallHandler.class);
|
||||||
|
|
||||||
public AbstractHuami2021FWInstallHandler(final Uri uri, final Context context) {
|
public AbstractZeppOsFwInstallHandler(final Uri uri, final Context context) {
|
||||||
super(uri, context);
|
super(uri, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ public abstract class AbstractHuami2021FWInstallHandler extends AbstractMiBandFW
|
|||||||
final AbstractHuamiFirmwareInfo firmwareInfo = getHelper().getFirmwareInfo();
|
final AbstractHuamiFirmwareInfo firmwareInfo = getHelper().getFirmwareInfo();
|
||||||
final boolean shouldCache = firmwareInfo.getFirmwareType().isApp() || firmwareInfo.getFirmwareType().isWatchface();
|
final boolean shouldCache = firmwareInfo.getFirmwareType().isApp() || firmwareInfo.getFirmwareType().isWatchface();
|
||||||
if (shouldCache) {
|
if (shouldCache) {
|
||||||
if (firmwareInfo instanceof Huami2021FirmwareInfo) {
|
if (firmwareInfo instanceof ZeppOsFirmwareInfo) {
|
||||||
saveToCache((Huami2021FirmwareInfo) firmwareInfo, device);
|
saveToCache((ZeppOsFirmwareInfo) firmwareInfo, device);
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("firmwareInfo is {} - this should never happen", firmwareInfo.getClass());
|
LOG.warn("firmwareInfo is {} - this should never happen", firmwareInfo.getClass());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public abstract class AbstractHuami2021FWInstallHandler extends AbstractMiBandFW
|
|||||||
return (HuamiFWHelper) helper;
|
return (HuamiFWHelper) helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveToCache(final Huami2021FirmwareInfo firmwareInfo, final GBDevice device) {
|
private void saveToCache(final ZeppOsFirmwareInfo firmwareInfo, final GBDevice device) {
|
||||||
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
final DeviceCoordinator coordinator = device.getDeviceCoordinator();
|
||||||
|
|
||||||
final File appCacheDir;
|
final File appCacheDir;
|
@ -26,19 +26,18 @@ import org.slf4j.LoggerFactory;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAlexaService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAlexaService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
|
|
||||||
public abstract class AbstractZeppOsService {
|
public abstract class AbstractZeppOsService {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAlexaService.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAlexaService.class);
|
||||||
|
|
||||||
private final Huami2021Support mSupport;
|
private final ZeppOsSupport mSupport;
|
||||||
private boolean encrypted;
|
private boolean encrypted;
|
||||||
|
|
||||||
public AbstractZeppOsService(final Huami2021Support support, final boolean encryptedDefault) {
|
public AbstractZeppOsService(final ZeppOsSupport support, final boolean encryptedDefault) {
|
||||||
this.mSupport = support;
|
this.mSupport = support;
|
||||||
this.encrypted = encryptedDefault;
|
this.encrypted = encryptedDefault;
|
||||||
}
|
}
|
||||||
@ -75,13 +74,13 @@ public abstract class AbstractZeppOsService {
|
|||||||
// we will already know the capabilities
|
// we will already know the capabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Huami2021Support getSupport() {
|
protected ZeppOsSupport getSupport() {
|
||||||
return mSupport;
|
return mSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Huami2021Coordinator getCoordinator() {
|
protected ZeppOsCoordinator getCoordinator() {
|
||||||
final DeviceCoordinator coordinator = getSupport().getDevice().getDeviceCoordinator();
|
final DeviceCoordinator coordinator = getSupport().getDevice().getDeviceCoordinator();
|
||||||
return (Huami2021Coordinator) coordinator;
|
return (ZeppOsCoordinator) coordinator;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Prefs getDevicePrefs() {
|
protected Prefs getDevicePrefs() {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
@ -36,9 +36,10 @@ import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityPoint;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityPoint;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityTrack;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityTrack;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.GPSCoordinate;
|
import nodomain.freeyourgadget.gadgetbridge.model.GPSCoordinate;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiActivityDetailsParser;
|
||||||
|
|
||||||
public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetailsParser {
|
public class ZeppOsActivityDetailsParser extends AbstractHuamiActivityDetailsParser {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021ActivityDetailsParser.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsActivityDetailsParser.class);
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", Locale.US);
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", Locale.US);
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ public class Huami2021ActivityDetailsParser extends AbstractHuamiActivityDetails
|
|||||||
private final ActivityTrack activityTrack;
|
private final ActivityTrack activityTrack;
|
||||||
private ActivityPoint lastActivityPoint;
|
private ActivityPoint lastActivityPoint;
|
||||||
|
|
||||||
public Huami2021ActivityDetailsParser(final BaseActivitySummary summary) {
|
public ZeppOsActivityDetailsParser(final BaseActivitySummary summary) {
|
||||||
this.timestamp = summary.getStartTime();
|
this.timestamp = summary.getStartTime();
|
||||||
|
|
||||||
this.longitude = summary.getBaseLongitude();
|
this.longitude = summary.getBaseLongitude();
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -24,7 +24,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
|||||||
/**
|
/**
|
||||||
* The workout types, used to start / when workout tracking starts on the band.
|
* The workout types, used to start / when workout tracking starts on the band.
|
||||||
*/
|
*/
|
||||||
public enum Huami2021WorkoutTrackActivityType {
|
public enum ZeppOsActivityType {
|
||||||
AerobicCombo(0x33),
|
AerobicCombo(0x33),
|
||||||
Aerobics(0x6d),
|
Aerobics(0x6d),
|
||||||
AirWalker(0x90),
|
AirWalker(0x90),
|
||||||
@ -147,11 +147,11 @@ public enum Huami2021WorkoutTrackActivityType {
|
|||||||
Zumba(0x4d),
|
Zumba(0x4d),
|
||||||
;
|
;
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021WorkoutTrackActivityType.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsActivityType.class);
|
||||||
|
|
||||||
private final byte code;
|
private final byte code;
|
||||||
|
|
||||||
Huami2021WorkoutTrackActivityType(final int code) {
|
ZeppOsActivityType(final int code) {
|
||||||
this.code = (byte) code;
|
this.code = (byte) code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,8 +210,8 @@ public enum Huami2021WorkoutTrackActivityType {
|
|||||||
return ActivityKind.TYPE_UNKNOWN;
|
return ActivityKind.TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Huami2021WorkoutTrackActivityType fromCode(final byte code) {
|
public static ZeppOsActivityType fromCode(final byte code) {
|
||||||
for (final Huami2021WorkoutTrackActivityType type : values()) {
|
for (final ZeppOsActivityType type : values()) {
|
||||||
if (type.getCode() == code) {
|
if (type.getCode() == code) {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
@ -15,7 +15,7 @@
|
|||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
@ -23,12 +23,10 @@ import android.graphics.BitmapFactory;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@ -39,19 +37,22 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceApp;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.AbstractHuamiFirmwareInfo;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiFirmwareType;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.UIHHContainer;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.BitmapUtil;
|
import nodomain.freeyourgadget.gadgetbridge.util.BitmapUtil;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.ZipFile;
|
import nodomain.freeyourgadget.gadgetbridge.util.ZipFile;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.ZipFileException;
|
import nodomain.freeyourgadget.gadgetbridge.util.ZipFileException;
|
||||||
|
|
||||||
|
|
||||||
public abstract class Huami2021FirmwareInfo extends AbstractHuamiFirmwareInfo {
|
public abstract class ZeppOsFirmwareInfo extends AbstractHuamiFirmwareInfo {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021FirmwareInfo.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsFirmwareInfo.class);
|
||||||
|
|
||||||
private final String preComputedVersion;
|
private final String preComputedVersion;
|
||||||
private GBDeviceApp gbDeviceApp;
|
private GBDeviceApp gbDeviceApp;
|
||||||
|
|
||||||
public Huami2021FirmwareInfo(final byte[] bytes) {
|
public ZeppOsFirmwareInfo(final byte[] bytes) {
|
||||||
super(bytes);
|
super(bytes);
|
||||||
this.preComputedVersion = preComputeVersion();
|
this.preComputedVersion = preComputeVersion();
|
||||||
}
|
}
|
||||||
@ -333,7 +334,7 @@ public abstract class Huami2021FirmwareInfo extends AbstractHuamiFirmwareInfo {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Huami2021FirmwareInfo repackFirmwareInUIHH() throws IOException {
|
public ZeppOsFirmwareInfo repackFirmwareInUIHH() throws IOException {
|
||||||
if (!firmwareType.equals(HuamiFirmwareType.FIRMWARE)) {
|
if (!firmwareType.equals(HuamiFirmwareType.FIRMWARE)) {
|
||||||
throw new IllegalStateException("Can only repack FIRMWARE");
|
throw new IllegalStateException("Can only repack FIRMWARE");
|
||||||
}
|
}
|
||||||
@ -341,7 +342,7 @@ public abstract class Huami2021FirmwareInfo extends AbstractHuamiFirmwareInfo {
|
|||||||
final UIHHContainer uihh = packFirmwareInUIHH(getBytes());
|
final UIHHContainer uihh = packFirmwareInUIHH(getBytes());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final Constructor<? extends Huami2021FirmwareInfo> constructor = this.getClass().getConstructor(byte[].class);
|
final Constructor<? extends ZeppOsFirmwareInfo> constructor = this.getClass().getConstructor(byte[].class);
|
||||||
return constructor.newInstance((Object) uihh.toRawBytes());
|
return constructor.newInstance((Object) uihh.toRawBytes());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
throw new IOException("Failed to construct new " + getClass().getName(), e);
|
throw new IOException("Failed to construct new " + getClass().getName(), e);
|
@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class Huami2021MenuType {
|
public class ZeppOsMenuType {
|
||||||
/**
|
/**
|
||||||
* These somewhat match the ones in {@link HuamiMenuType}, but not all. The band sends and
|
* These somewhat match the ones in HuamiMenuType, but not all. The band sends and
|
||||||
* receives those as 8-digit upper case hex strings.
|
* receives those as 8-digit upper case hex strings.
|
||||||
*/
|
*/
|
||||||
public static final Map<String, String> displayItemNameLookup = new HashMap<String, String>() {{
|
public static final Map<String, String> displayItemNameLookup = new HashMap<String, String>() {{
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import static org.apache.commons.lang3.ArrayUtils.subarray;
|
import static org.apache.commons.lang3.ArrayUtils.subarray;
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service.*;
|
import static nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service.*;
|
||||||
@ -78,7 +78,7 @@ import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventFindPhone;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventScreenshot;
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventScreenshot;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSilentMode;
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventSilentMode;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventUpdatePreferences;
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventUpdatePreferences;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Service;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiCoordinator;
|
||||||
@ -105,9 +105,13 @@ import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiBatteryInfo;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiDeviceEvent;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiPhoneGpsStatus;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiVibrationPatternNotificationType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.operations.UpdateFirmwareOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.operations.UpdateFirmwareOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.operations.UpdateFirmwareOperation2021;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.operations.UpdateFirmwareOperation2021;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsAgpsUpdateOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsAgpsUpdateOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsGpxRouteUploadOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.operations.ZeppOsGpxRouteUploadOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAgpsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAgpsService;
|
||||||
@ -139,8 +143,8 @@ import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.SilentMode;
|
import nodomain.freeyourgadget.gadgetbridge.util.SilentMode;
|
||||||
|
|
||||||
public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFileTransferService.Callback {
|
public abstract class ZeppOsSupport extends HuamiSupport implements ZeppOsFileTransferService.Callback {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021Support.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsSupport.class);
|
||||||
|
|
||||||
// Tracks whether realtime HR monitoring is already started, so we can just
|
// Tracks whether realtime HR monitoring is already started, so we can just
|
||||||
// send CONTINUE commands
|
// send CONTINUE commands
|
||||||
@ -203,11 +207,11 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
put(musicService.getEndpoint(), musicService);
|
put(musicService.getEndpoint(), musicService);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public Huami2021Support() {
|
public ZeppOsSupport() {
|
||||||
this(LOG);
|
this(LOG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Huami2021Support(final Logger logger) {
|
public ZeppOsSupport(final Logger logger) {
|
||||||
super(logger);
|
super(logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +347,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support sendCalendarEvents(final TransactionBuilder builder) {
|
protected ZeppOsSupport sendCalendarEvents(final TransactionBuilder builder) {
|
||||||
// We have native calendar sync
|
// We have native calendar sync
|
||||||
CalendarReceiver.forceSync();
|
CalendarReceiver.forceSync();
|
||||||
return this;
|
return this;
|
||||||
@ -399,7 +403,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support requestBatteryInfo(TransactionBuilder builder) {
|
protected ZeppOsSupport requestBatteryInfo(TransactionBuilder builder) {
|
||||||
LOG.debug("Requesting Battery Info");
|
LOG.debug("Requesting Battery Info");
|
||||||
|
|
||||||
writeToChunked2021(builder, CHUNKED2021_ENDPOINT_BATTERY, BATTERY_REQUEST, false);
|
writeToChunked2021(builder, CHUNKED2021_ENDPOINT_BATTERY, BATTERY_REQUEST, false);
|
||||||
@ -408,7 +412,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setFitnessGoal(final TransactionBuilder builder) {
|
protected ZeppOsSupport setFitnessGoal(final TransactionBuilder builder) {
|
||||||
final int goalSteps = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_STEPS_GOAL, ActivityUser.defaultUserStepsGoal);
|
final int goalSteps = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_STEPS_GOAL, ActivityUser.defaultUserStepsGoal);
|
||||||
final int goalCalories = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_CALORIES_BURNT, ActivityUser.defaultUserCaloriesBurntGoal);
|
final int goalCalories = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_CALORIES_BURNT, ActivityUser.defaultUserCaloriesBurntGoal);
|
||||||
final int goalSleep = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_SLEEP_DURATION, ActivityUser.defaultUserSleepDurationGoal);
|
final int goalSleep = GBApplication.getPrefs().getInt(ActivityUser.PREF_USER_SLEEP_DURATION, ActivityUser.defaultUserSleepDurationGoal);
|
||||||
@ -430,7 +434,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setUserInfo(final TransactionBuilder builder) {
|
protected ZeppOsSupport setUserInfo(final TransactionBuilder builder) {
|
||||||
LOG.info("Attempting to set user info...");
|
LOG.info("Attempting to set user info...");
|
||||||
|
|
||||||
final Prefs prefs = GBApplication.getPrefs();
|
final Prefs prefs = GBApplication.getPrefs();
|
||||||
@ -487,7 +491,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setPassword(final TransactionBuilder builder) {
|
protected ZeppOsSupport setPassword(final TransactionBuilder builder) {
|
||||||
final boolean passwordEnabled = HuamiCoordinator.getPasswordEnabled(gbDevice.getAddress());
|
final boolean passwordEnabled = HuamiCoordinator.getPasswordEnabled(gbDevice.getAddress());
|
||||||
final String password = HuamiCoordinator.getPassword(gbDevice.getAddress());
|
final String password = HuamiCoordinator.getPassword(gbDevice.getAddress());
|
||||||
|
|
||||||
@ -714,7 +718,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setHeartrateSleepSupport(final TransactionBuilder builder) {
|
protected ZeppOsSupport setHeartrateSleepSupport(final TransactionBuilder builder) {
|
||||||
final boolean enableHrSleepSupport = MiBandCoordinator.getHeartrateSleepSupport(gbDevice.getAddress());
|
final boolean enableHrSleepSupport = MiBandCoordinator.getHeartrateSleepSupport(gbDevice.getAddress());
|
||||||
|
|
||||||
configService.newSetter()
|
configService.newSetter()
|
||||||
@ -737,7 +741,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Huami2021Support setCurrentTimeWithService(TransactionBuilder builder) {
|
public ZeppOsSupport setCurrentTimeWithService(TransactionBuilder builder) {
|
||||||
// It seems that the format sent to the Current Time characteristic changed in newer devices
|
// It seems that the format sent to the Current Time characteristic changed in newer devices
|
||||||
// to kind-of match the GATT spec, but it doesn't quite respect it?
|
// to kind-of match the GATT spec, but it doesn't quite respect it?
|
||||||
// - 11 bytes get sent instead of 10 (extra byte at the end for the offset in quarter-hours?)
|
// - 11 bytes get sent instead of 10 (extra byte at the end for the offset in quarter-hours?)
|
||||||
@ -773,8 +777,8 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Huami2021Support enableFurtherNotifications(final TransactionBuilder builder,
|
public ZeppOsSupport enableFurtherNotifications(final TransactionBuilder builder,
|
||||||
final boolean enable) {
|
final boolean enable) {
|
||||||
// Nothing to do here, they are already enabled from enableNotifications
|
// Nothing to do here, they are already enabled from enableNotifications
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -849,7 +853,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setTimeFormat(final TransactionBuilder builder) {
|
protected ZeppOsSupport setTimeFormat(final TransactionBuilder builder) {
|
||||||
final GBPrefs gbPrefs = new GBPrefs(getDevicePrefs());
|
final GBPrefs gbPrefs = new GBPrefs(getDevicePrefs());
|
||||||
final String timeFormat = gbPrefs.getTimeFormat();
|
final String timeFormat = gbPrefs.getTimeFormat();
|
||||||
|
|
||||||
@ -876,7 +880,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setDistanceUnit(final TransactionBuilder builder) {
|
protected ZeppOsSupport setDistanceUnit(final TransactionBuilder builder) {
|
||||||
final MiBandConst.DistanceUnit unit = HuamiCoordinator.getDistanceUnit();
|
final MiBandConst.DistanceUnit unit = HuamiCoordinator.getDistanceUnit();
|
||||||
LOG.info("Setting distance unit to {}", unit);
|
LOG.info("Setting distance unit to {}", unit);
|
||||||
|
|
||||||
@ -899,7 +903,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support setLanguage(final TransactionBuilder builder) {
|
protected ZeppOsSupport setLanguage(final TransactionBuilder builder) {
|
||||||
final String localeString = GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress())
|
final String localeString = GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress())
|
||||||
.getString("language", "auto");
|
.getString("language", "auto");
|
||||||
|
|
||||||
@ -938,7 +942,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Support requestGPSVersion(final TransactionBuilder builder) {
|
protected ZeppOsSupport requestGPSVersion(final TransactionBuilder builder) {
|
||||||
LOG.warn("Request GPS version not implemented");
|
LOG.warn("Request GPS version not implemented");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -1011,7 +1015,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
// At this point we got the service list from phase 3, so we know which
|
// At this point we got the service list from phase 3, so we know which
|
||||||
// services are supported, and whether they are encrypted or not
|
// services are supported, and whether they are encrypted or not
|
||||||
|
|
||||||
final Huami2021Coordinator coordinator = getCoordinator();
|
final ZeppOsCoordinator coordinator = getCoordinator();
|
||||||
|
|
||||||
// TODO move this to a service
|
// TODO move this to a service
|
||||||
setUserInfo(builder);
|
setUserInfo(builder);
|
||||||
@ -1066,8 +1070,8 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Huami2021Coordinator getCoordinator() {
|
protected ZeppOsCoordinator getCoordinator() {
|
||||||
return (Huami2021Coordinator) gbDevice.getDeviceCoordinator();
|
return (ZeppOsCoordinator) gbDevice.getDeviceCoordinator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1199,7 +1203,7 @@ public abstract class Huami2021Support extends HuamiSupport implements ZeppOsFil
|
|||||||
protected void handle2021Workout(final byte[] payload) {
|
protected void handle2021Workout(final byte[] payload) {
|
||||||
switch (payload[0]) {
|
switch (payload[0]) {
|
||||||
case WORKOUT_CMD_APP_OPEN:
|
case WORKOUT_CMD_APP_OPEN:
|
||||||
final Huami2021WorkoutTrackActivityType activityType = Huami2021WorkoutTrackActivityType.fromCode(payload[3]);
|
final ZeppOsActivityType activityType = ZeppOsActivityType.fromCode(payload[3]);
|
||||||
final boolean workoutNeedsGps = (payload[2] == 1);
|
final boolean workoutNeedsGps = (payload[2] == 1);
|
||||||
final int activityKind;
|
final int activityKind;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos;
|
||||||
|
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
|
|
||||||
@ -55,8 +55,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.webview.Curre
|
|||||||
* The weather models that the bands expect as an http response to weather requests. Base URL usually
|
* The weather models that the bands expect as an http response to weather requests. Base URL usually
|
||||||
* is https://api-mifit.huami.com.
|
* is https://api-mifit.huami.com.
|
||||||
*/
|
*/
|
||||||
public class Huami2021Weather {
|
public class ZeppOsWeather {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(Huami2021Weather.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsWeather.class);
|
||||||
|
|
||||||
private static final Gson GSON = new GsonBuilder()
|
private static final Gson GSON = new GsonBuilder()
|
||||||
.serializeNulls()
|
.serializeNulls()
|
||||||
@ -86,7 +86,7 @@ public class Huami2021Weather {
|
|||||||
|
|
||||||
if (weatherSpec == null) {
|
if (weatherSpec == null) {
|
||||||
LOG.error("No weather in weather instance");
|
LOG.error("No weather in weather instance");
|
||||||
return new Huami2021Weather.ErrorResponse(404, -2001, "Not found");
|
return new ZeppOsWeather.ErrorResponse(404, -2001, "Not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (path) {
|
switch (path) {
|
||||||
@ -109,7 +109,7 @@ public class Huami2021Weather {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG.error("Unknown weather path {}", path);
|
LOG.error("Unknown weather path {}", path);
|
||||||
return new Huami2021Weather.ErrorResponse(404, -2001, "Not found");
|
return new ZeppOsWeather.ErrorResponse(404, -2001, "Not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getQueryNum(final Map<String, String> query, final String key, final int defaultValue) {
|
private static int getQueryNum(final Map<String, String> query, final String key, final int defaultValue) {
|
@ -25,7 +25,7 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetProgressAction;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetProgressAction;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAgpsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsAgpsService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsConfigService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsConfigService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsFileTransferService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsFileTransferService;
|
||||||
@ -40,7 +40,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
|||||||
* 4. After successful ack from 3, update is finished. Trigger an AGPS config request from {@link ZeppOsConfigService}
|
* 4. After successful ack from 3, update is finished. Trigger an AGPS config request from {@link ZeppOsConfigService}
|
||||||
* to reload the AGPS update and expiration timestamps.
|
* to reload the AGPS update and expiration timestamps.
|
||||||
*/
|
*/
|
||||||
public class ZeppOsAgpsUpdateOperation extends AbstractBTLEOperation<Huami2021Support>
|
public class ZeppOsAgpsUpdateOperation extends AbstractBTLEOperation<ZeppOsSupport>
|
||||||
implements ZeppOsFileTransferService.Callback, ZeppOsAgpsService.Callback {
|
implements ZeppOsFileTransferService.Callback, ZeppOsAgpsService.Callback {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAgpsUpdateOperation.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAgpsUpdateOperation.class);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public class ZeppOsAgpsUpdateOperation extends AbstractBTLEOperation<Huami2021Su
|
|||||||
private final ZeppOsFileTransferService fileTransferService;
|
private final ZeppOsFileTransferService fileTransferService;
|
||||||
private final ZeppOsConfigService configService;
|
private final ZeppOsConfigService configService;
|
||||||
|
|
||||||
public ZeppOsAgpsUpdateOperation(final Huami2021Support support,
|
public ZeppOsAgpsUpdateOperation(final ZeppOsSupport support,
|
||||||
final ZeppOsAgpsFile file,
|
final ZeppOsAgpsFile file,
|
||||||
final ZeppOsAgpsService agpsService,
|
final ZeppOsAgpsService agpsService,
|
||||||
final ZeppOsFileTransferService fileTransferService,
|
final ZeppOsFileTransferService fileTransferService,
|
||||||
|
@ -25,12 +25,12 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEOperation;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEOperation;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetProgressAction;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetProgressAction;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsFileTransferService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services.ZeppOsFileTransferService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.OperationStatus;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.OperationStatus;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||||
|
|
||||||
public class ZeppOsGpxRouteUploadOperation extends AbstractBTLEOperation<Huami2021Support>
|
public class ZeppOsGpxRouteUploadOperation extends AbstractBTLEOperation<ZeppOsSupport>
|
||||||
implements ZeppOsFileTransferService.Callback {
|
implements ZeppOsFileTransferService.Callback {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsGpxRouteUploadOperation.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsGpxRouteUploadOperation.class);
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ public class ZeppOsGpxRouteUploadOperation extends AbstractBTLEOperation<Huami20
|
|||||||
|
|
||||||
private final ZeppOsFileTransferService fileTransferService;
|
private final ZeppOsFileTransferService fileTransferService;
|
||||||
|
|
||||||
public ZeppOsGpxRouteUploadOperation(final Huami2021Support support,
|
public ZeppOsGpxRouteUploadOperation(final ZeppOsSupport support,
|
||||||
final ZeppOsGpxRouteFile file,
|
final ZeppOsGpxRouteFile file,
|
||||||
final ZeppOsFileTransferService fileTransferService) {
|
final ZeppOsFileTransferService fileTransferService) {
|
||||||
super(support);
|
super(support);
|
||||||
|
@ -25,7 +25,7 @@ import java.nio.ByteBuffer;
|
|||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
||||||
|
|
||||||
public class ZeppOsAgpsService extends AbstractZeppOsService {
|
public class ZeppOsAgpsService extends AbstractZeppOsService {
|
||||||
@ -41,7 +41,7 @@ public class ZeppOsAgpsService extends AbstractZeppOsService {
|
|||||||
|
|
||||||
private Callback mCallback = null;
|
private Callback mCallback = null;
|
||||||
|
|
||||||
public ZeppOsAgpsService(final Huami2021Support support) {
|
public ZeppOsAgpsService(final ZeppOsSupport support) {
|
||||||
super(support, false);
|
super(support, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,10 +33,9 @@ import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceService;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.AlarmUtils;
|
import nodomain.freeyourgadget.gadgetbridge.util.AlarmUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
|
||||||
|
|
||||||
public class ZeppOsAlarmsService extends AbstractZeppOsService {
|
public class ZeppOsAlarmsService extends AbstractZeppOsService {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAlarmsService.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZeppOsAlarmsService.class);
|
||||||
@ -65,7 +64,7 @@ public class ZeppOsAlarmsService extends AbstractZeppOsService {
|
|||||||
public static final int FLAG_UNKNOWN_2 = 0x02;
|
public static final int FLAG_UNKNOWN_2 = 0x02;
|
||||||
public static final int FLAG_ENABLED = 0x04;
|
public static final int FLAG_ENABLED = 0x04;
|
||||||
|
|
||||||
public ZeppOsAlarmsService(final Huami2021Support support) {
|
public ZeppOsAlarmsService(final ZeppOsSupport support) {
|
||||||
super(support, false);
|
super(support, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services;
|
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.services;
|
||||||
|
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_VOICE_SERVICE_LANGUAGE;
|
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_VOICE_SERVICE_LANGUAGE;
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.PREF_WATCHFACE;
|
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@ -37,11 +36,11 @@ import java.util.List;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst;
|
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils;
|
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsUtils;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventUpdatePreferences;
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventUpdatePreferences;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.Huami2021Coordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.huami.zeppos.ZeppOsCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.Huami2021Support;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.ZeppOsSupport;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.zeppos.AbstractZeppOsService;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
@ -82,7 +81,7 @@ public class ZeppOsAlexaService extends AbstractZeppOsService {
|
|||||||
|
|
||||||
final ByteArrayOutputStream voiceBuffer = new ByteArrayOutputStream();
|
final ByteArrayOutputStream voiceBuffer = new ByteArrayOutputStream();
|
||||||
|
|
||||||
public ZeppOsAlexaService(final Huami2021Support support) {
|
public ZeppOsAlexaService(final ZeppOsSupport support) {
|
||||||
super(support, true);
|
super(support, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +147,7 @@ public class ZeppOsAlexaService extends AbstractZeppOsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(final TransactionBuilder builder) {
|
public void initialize(final TransactionBuilder builder) {
|
||||||
if (Huami2021Coordinator.experimentalFeatures(getSupport().getDevice())) {
|
if (ZeppOsCoordinator.experimentalFeatures(getSupport().getDevice())) {
|
||||||
requestCapabilities(builder);
|
requestCapabilities(builder);
|
||||||
requestLanguages(builder);
|
requestLanguages(builder);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user