Make DeviceSupportFactory recognize device names starting with MI

here
Sergey Trofimov 2015-10-18 09:20:18 +03:00
parent f0a1d5f8a0
commit 1c1f8e8535
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class DeviceSupportFactory {
try {
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);
deviceSupport = new ServiceDeviceSupport(new MiBandSupport(), EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING));
} else if (btDevice.getName().indexOf("Pebble") == 0) {