Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
User Info is probably the same for MI 1A and 1S #178
Browse files Browse the repository at this point in the history
Can you please test whether this fixes the connection problems?
  • Loading branch information
cpfeiffer committed Dec 8, 2015
1 parent 159c187 commit 0d63e5b
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -5,9 +5,6 @@

import java.util.Arrays;

/**
* Created by UgoRaffaele on 30/01/2015.
*/
public class UserInfo {

private final String btAddress;
Expand Down Expand Up @@ -62,7 +59,7 @@ private UserInfo(String address, String alias, int gender, int age, int height,
}

private int calculateUidFrom(String alias) {
int uid = 0;
int uid;
try {
uid = Integer.parseInt(alias);
} catch (NumberFormatException ex) {
Expand All @@ -87,7 +84,7 @@ public byte[] getData(DeviceInfo mDeviceInfo) {
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;
Expand Down

0 comments on commit 0d63e5b

Please sign in to comment.