1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-23 18:36:50 +01:00

* Mi Band 4/Amazfit Bip Lite: Trim white spaces and new lines from auth key

This commit is contained in:
Andreas Shimokawa 2019-10-12 19:04:12 +02:00
parent f0808f7232
commit 8fefd1b49e
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* Wrist location settings are now per-device for all supported devices
* Work around broken layout in database management activity
* Show toast in case no app is installed which can handle GPX files
* Mi Band 4/Amazfit Bip Lite: Trim white spaces and new lines from auth key
#### Version 0.36.2
* Amazfit Bip: Untested support for Lite variant

View File

@ -94,7 +94,7 @@ public class InitOperation extends AbstractBTLEOperation<HuamiSupport> {
String authKey = sharedPrefs.getString("authkey", null);
if (authKey != null && !authKey.isEmpty()) {
byte[] srcBytes = authKey.getBytes();
byte[] srcBytes = authKey.trim().getBytes();
if (authKey.length() == 34 && authKey.substring(0, 2).equals("0x")) {
srcBytes = GB.hexStringToByteArray(authKey.substring(2));
}