mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-19 15:17:50 +01:00
Recoginze "Xiaomi Band 3" as Mi Band 3
When running newer Firmwares (since 2.2.0.12) it is possible that devics name themselves "Xiaomi Band 3". After a factory reset? Related to target market? Closes #1517
This commit is contained in:
parent
dd067eddd7
commit
6b72292812
@ -47,6 +47,7 @@ public class HuamiConst {
|
||||
public static final String MI_BAND2_NAME = "MI Band 2";
|
||||
public static final String MI_BAND2_NAME_HRX = "Mi Band HRX";
|
||||
public static final String MI_BAND3_NAME = "Mi Band 3";
|
||||
public static final String MI_BAND3_NAME_2 = "Xiaomi Band 3";
|
||||
|
||||
public static final String PREF_ACTIVATE_DISPLAY_ON_LIFT = "activate_display_on_lift_wrist";
|
||||
public static final String PREF_DISPLAY_ON_LIFT_START = "display_on_lift_start";
|
||||
|
@ -52,7 +52,7 @@ public class MiBand3Coordinator extends HuamiCoordinator {
|
||||
try {
|
||||
BluetoothDevice device = candidate.getDevice();
|
||||
String name = device.getName();
|
||||
if (name != null && name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME)) {
|
||||
if (name != null && (name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME) || name.equalsIgnoreCase(HuamiConst.MI_BAND3_NAME_2))) {
|
||||
return DeviceType.MIBAND3;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user