1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-17 02:44:04 +02:00

Add initial Watch X non-plus support

This commit is contained in:
mamutcho 2019-11-20 20:38:02 +02:00
parent 0cffd0f54c
commit e03fd4357e
3 changed files with 7 additions and 2 deletions

View File

@ -79,6 +79,10 @@ public class WatchXPlusDeviceCoordinator extends AbstractDeviceCoordinator {
return DeviceType.WATCHXPLUS;
} else if (deviceName.equalsIgnoreCase("WATCH XPLUS")) {
return DeviceType.WATCHXPLUS;
// add initial support for Watch X non-plus (forces Watch X to be recognized as Watch XPlus)
// Watch X non-plus have same MAC address as Watch 9 (starts with "1C:87:79")
} else if (deviceName.equalsIgnoreCase("WATCH X")) {
return DeviceType.WATCHXPLUS;
}
return DeviceType.UNKNOWN;
}

View File

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

View File

@ -39,7 +39,7 @@
android:key="pref_category_watchxplus_callhandling"
android:title="@string/pref_header_wxp_notification_callhandling">
<PreferenceCategory
android:title="@string/pref_header_wxp_longsit"/>
android:title="@string/pref_header_wxp_notification_callhandling"/>
<CheckBoxPreference
android:layout="@layout/preference_checkbox"
android:defaultValue="false"