mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-29 12:05:53 +01:00
parent
824382b385
commit
a6d3c50f94
@ -30,7 +30,9 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||
|
||||
@Override
|
||||
public boolean supports(GBDeviceCandidate candidate) {
|
||||
return candidate.getMacAddress().toUpperCase().startsWith(MiBandService.MAC_ADDRESS_FILTER);
|
||||
String macAddress = candidate.getMacAddress().toUpperCase();
|
||||
return macAddress.startsWith(MiBandService.MAC_ADDRESS_FILTER_1_1A)
|
||||
|| macAddress.startsWith(MiBandService.MAC_ADDRESS_FILTER_1S);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -74,7 +76,7 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||
}
|
||||
|
||||
public static boolean hasValidUserInfo() {
|
||||
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER + ":00:00:00";
|
||||
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00";
|
||||
try {
|
||||
UserInfo userInfo = getConfiguredUserInfo(dummyMacAddress);
|
||||
return true;
|
||||
|
@ -9,7 +9,8 @@ import static nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDevi
|
||||
public class MiBandService {
|
||||
|
||||
|
||||
public static final String MAC_ADDRESS_FILTER = "88:0F:10";
|
||||
public static final String MAC_ADDRESS_FILTER_1_1A = "88:0F:10";
|
||||
public static final String MAC_ADDRESS_FILTER_1S = "C8:0F:10";
|
||||
|
||||
public static final UUID UUID_SERVICE_MIBAND_SERVICE = UUID.fromString(String.format(BASE_UUID, "FEE0"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user