1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

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

Can you please test whether this fixes the connection problems?
This commit is contained in:
cpfeiffer 2015-12-08 21:48:25 +01:00
parent 159c187e5e
commit 0d63e5b770

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;