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:
parent
f0808f7232
commit
8fefd1b49e
@ -10,6 +10,7 @@
|
|||||||
* Wrist location settings are now per-device for all supported devices
|
* Wrist location settings are now per-device for all supported devices
|
||||||
* Work around broken layout in database management activity
|
* Work around broken layout in database management activity
|
||||||
* Show toast in case no app is installed which can handle GPX files
|
* 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
|
#### Version 0.36.2
|
||||||
* Amazfit Bip: Untested support for Lite variant
|
* Amazfit Bip: Untested support for Lite variant
|
||||||
|
@ -94,7 +94,7 @@ public class InitOperation extends AbstractBTLEOperation<HuamiSupport> {
|
|||||||
|
|
||||||
String authKey = sharedPrefs.getString("authkey", null);
|
String authKey = sharedPrefs.getString("authkey", null);
|
||||||
if (authKey != null && !authKey.isEmpty()) {
|
if (authKey != null && !authKey.isEmpty()) {
|
||||||
byte[] srcBytes = authKey.getBytes();
|
byte[] srcBytes = authKey.trim().getBytes();
|
||||||
if (authKey.length() == 34 && authKey.substring(0, 2).equals("0x")) {
|
if (authKey.length() == 34 && authKey.substring(0, 2).equals("0x")) {
|
||||||
srcBytes = GB.hexStringToByteArray(authKey.substring(2));
|
srcBytes = GB.hexStringToByteArray(authKey.substring(2));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user