1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Xiaomi: fix for invalid birthdate being sent in user info

This commit is contained in:
MrYoranimo 2023-12-07 03:15:18 +01:00
parent 435d41aca0
commit 0378f48798

View File

@ -230,7 +230,7 @@ public class XiaomiHealthService extends AbstractXiaomiService {
final XiaomiProto.UserInfo userInfo = XiaomiProto.UserInfo.newBuilder()
.setHeight(activityUser.getHeightCm())
.setWeight(activityUser.getWeightKg())
.setBirthday(Integer.parseInt(String.format(Locale.ROOT, "%02d%02d%02d", birthYear, birthMonth, birthDay)))
.setBirthday(Integer.parseInt(String.format(Locale.ROOT, "%04d%02d%02d", birthYear, birthMonth, birthDay)))
.setGender(genderInt)
.setMaxHeartRate(maxHeartRate)
.setGoalCalories(activityUser.getCaloriesBurntGoal())