Basic support for Mi Band 2 #323, untested
This commit is contained in:
parent
1ed0dc59b2
commit
ca26e27c60
|
@ -28,6 +28,7 @@ public final class MiBandConst {
|
||||||
public static final String MI_1A = "1A";
|
public static final String MI_1A = "1A";
|
||||||
public static final String MI_1S = "1S";
|
public static final String MI_1S = "1S";
|
||||||
public static final String MI_AMAZFIT = "Amazfit";
|
public static final String MI_AMAZFIT = "Amazfit";
|
||||||
|
public static final String MI_PRO = "2";
|
||||||
|
|
||||||
public static int getNotificationPrefIntValue(String pref, String origin, Prefs prefs, int defaultValue) {
|
public static int getNotificationPrefIntValue(String pref, String origin, Prefs prefs, int defaultValue) {
|
||||||
String key = getNotificationPrefKey(pref, origin);
|
String key = getNotificationPrefKey(pref, origin);
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class DeviceInfo extends AbstractInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean supportsHeartrate() {
|
public boolean supportsHeartrate() {
|
||||||
return isMili1S() || (test1AHRMode && isMili1A());
|
return isMiliPro() || isMili1S() || (test1AHRMode && isMili1A());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -116,6 +116,10 @@ public class DeviceInfo extends AbstractInfo {
|
||||||
return hwVersion == 6;
|
return hwVersion == 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMiliPro() {
|
||||||
|
return hwVersion == 8 || (feature == 8 && appearance == 0);
|
||||||
|
}
|
||||||
|
|
||||||
public String getHwVersion() {
|
public String getHwVersion() {
|
||||||
if (isMili1()) {
|
if (isMili1()) {
|
||||||
return MiBandConst.MI_1;
|
return MiBandConst.MI_1;
|
||||||
|
@ -129,6 +133,9 @@ public class DeviceInfo extends AbstractInfo {
|
||||||
if (isAmazFit()) {
|
if (isAmazFit()) {
|
||||||
return MiBandConst.MI_AMAZFIT;
|
return MiBandConst.MI_AMAZFIT;
|
||||||
}
|
}
|
||||||
|
if (isMiliPro()) {
|
||||||
|
return MiBandConst.MI_PRO;
|
||||||
|
}
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue