User Info is probably the same for MI 1A and 1S #178

Can you please test whether this fixes the connection problems?
here
cpfeiffer 2015-12-08 21:48:25 +01:00
parent 159c187e5e
commit 0d63e5b770
1 changed files with 2 additions and 5 deletions

View File

@ -5,9 +5,6 @@ import nodomain.freeyourgadget.gadgetbridge.util.CheckSums;
import java.util.Arrays;
/**
* Created by UgoRaffaele on 30/01/2015.
*/
public class UserInfo {
private final String btAddress;
@ -62,7 +59,7 @@ public class UserInfo {
}
private int calculateUidFrom(String alias) {
int uid = 0;
int uid;
try {
uid = Integer.parseInt(alias);
} catch (NumberFormatException ex) {
@ -87,7 +84,7 @@ public class UserInfo {
sequence[8] = (byte) (type & 0xff);
int aliasFrom = 9;
if (mDeviceInfo.isMili1A()) {
if (mDeviceInfo.isMili1A() || mDeviceInfo.isMilli1S()) {
sequence[9] = (byte) (mDeviceInfo.feature & 255);
sequence[10] = (byte) (mDeviceInfo.appearance & 255);
aliasFrom = 11;