1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 10:05:49 +01:00

Roidmi 3: Add support for Mojietu 3 rebrand

This commit is contained in:
José Rebelo 2021-12-25 13:52:39 +00:00 committed by vanous
parent c23810f54c
commit 5dfcaa65ea
2 changed files with 7 additions and 3 deletions

View File

@ -77,7 +77,7 @@ vendor's servers.
- Pebble
- [Pebble, Steel, Time, Time Steel, Time Round, 2](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Pebble)
- PineTime (InfiniTime Firmware)
- Roidmi, Roidmi 3 (Bluetooth FM Transmitters)
- Roidmi, Roidmi 3, Mojietu 3 (Bluetooth FM Transmitters)
- [SMA](https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/SMA) Q2 (SMA-Q2-OSS Firmware)
- Sony WH-1000XM3
- Teclast H10, H30

View File

@ -34,9 +34,13 @@ public class Roidmi3Coordinator extends RoidmiCoordinator {
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
try {
BluetoothDevice device = candidate.getDevice();
String name = device.getName();
final String name = device.getName();
if (name != null && name.contains("Roidmi Music Blue C")) {
if (name == null) {
return DeviceType.UNKNOWN;
}
if (name.contains("Roidmi Music Blue C") || name.contains("Mojietu Music Blue C")) {
return DeviceType.ROIDMI3;
}
} catch (Exception ex) {