1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Add support for Watch X Plus with same MAC as Watch 9

This commit is contained in:
mamutcho 2019-12-18 23:09:26 +02:00
parent f7e7cfaa0c
commit 8d7f170c70

View File

@ -64,7 +64,8 @@ public class Watch9DeviceCoordinator extends AbstractDeviceCoordinator {
if (candidate.supportsService(Watch9Constants.UUID_SERVICE_WATCH9)) { if (candidate.supportsService(Watch9Constants.UUID_SERVICE_WATCH9)) {
return DeviceType.WATCH9; return DeviceType.WATCH9;
// add support for Watch X non-plus (same MAC address) // add support for Watch X non-plus (same MAC address)
} else if ((macAddress.startsWith("1C:87:79")) && (!deviceName.equalsIgnoreCase("WATCH X"))) { // add support for Watch X Plus (same MAC address)
} else if ((macAddress.startsWith("1C:87:79")) && ((!deviceName.equalsIgnoreCase("WATCH X")) || (!deviceName.equalsIgnoreCase("WATCH XPLUS")))) {
return DeviceType.WATCH9; return DeviceType.WATCH9;
} else if (deviceName.equals("WATCH 9")) { } else if (deviceName.equals("WATCH 9")) {
return DeviceType.WATCH9; return DeviceType.WATCH9;