mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-14 11:47:32 +01:00
Make DeviceSupportFactory recognize device names starting with MI
This commit is contained in:
parent
f0a1d5f8a0
commit
1c1f8e8535
@ -79,7 +79,7 @@ public class DeviceSupportFactory {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
BluetoothDevice btDevice = mBtAdapter.getRemoteDevice(deviceAddress);
|
BluetoothDevice btDevice = mBtAdapter.getRemoteDevice(deviceAddress);
|
||||||
if (btDevice.getName() == null || btDevice.getName().equals("MI")) { //FIXME: workaround for Miband not being paired
|
if (btDevice.getName() == null || btDevice.getName().startsWith("MI")) { //FIXME: workaround for Miband not being paired
|
||||||
gbDevice = new GBDevice(deviceAddress, "MI", DeviceType.MIBAND);
|
gbDevice = new GBDevice(deviceAddress, "MI", DeviceType.MIBAND);
|
||||||
deviceSupport = new ServiceDeviceSupport(new MiBandSupport(), EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
deviceSupport = new ServiceDeviceSupport(new MiBandSupport(), EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||||
} else if (btDevice.getName().indexOf("Pebble") == 0) {
|
} else if (btDevice.getName().indexOf("Pebble") == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user