mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-01 13:35:49 +01:00
Add initial Watch X non-plus support
This commit is contained in:
parent
0cffd0f54c
commit
e03fd4357e
@ -79,6 +79,10 @@ public class WatchXPlusDeviceCoordinator extends AbstractDeviceCoordinator {
|
|||||||
return DeviceType.WATCHXPLUS;
|
return DeviceType.WATCHXPLUS;
|
||||||
} else if (deviceName.equalsIgnoreCase("WATCH XPLUS")) {
|
} else if (deviceName.equalsIgnoreCase("WATCH XPLUS")) {
|
||||||
return DeviceType.WATCHXPLUS;
|
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;
|
return DeviceType.UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,8 @@ public class Watch9DeviceCoordinator extends AbstractDeviceCoordinator {
|
|||||||
String deviceName = candidate.getName().toUpperCase();
|
String deviceName = candidate.getName().toUpperCase();
|
||||||
if (candidate.supportsService(Watch9Constants.UUID_SERVICE_WATCH9)) {
|
if (candidate.supportsService(Watch9Constants.UUID_SERVICE_WATCH9)) {
|
||||||
return DeviceType.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;
|
return DeviceType.WATCH9;
|
||||||
} else if (deviceName.equals("WATCH 9")) {
|
} else if (deviceName.equals("WATCH 9")) {
|
||||||
return DeviceType.WATCH9;
|
return DeviceType.WATCH9;
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
android:key="pref_category_watchxplus_callhandling"
|
android:key="pref_category_watchxplus_callhandling"
|
||||||
android:title="@string/pref_header_wxp_notification_callhandling">
|
android:title="@string/pref_header_wxp_notification_callhandling">
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/pref_header_wxp_longsit"/>
|
android:title="@string/pref_header_wxp_notification_callhandling"/>
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
Loading…
Reference in New Issue
Block a user