mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-10-31 22:52:59 +01:00
Amazfit GTR: Enforce auth key input when pairing, try to fix notifications
This commit is contained in:
parent
cbd47a81cc
commit
c2c240d7be
@ -58,4 +58,9 @@ public class AmazfitGTRCoordinator extends AmazfitBipCoordinator {
|
||||
public InstallHandler findInstallHandler(Uri uri, Context context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBondingStyle() {
|
||||
return BONDING_STYLE_REQUIRE_KEY;
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ public class AmazfitBipSupport extends HuamiSupport {
|
||||
appSuffix = appName.getBytes();
|
||||
suffixlength = appSuffix.length;
|
||||
}
|
||||
if (gbDevice.getType() == DeviceType.MIBAND4) {
|
||||
if (gbDevice.getType() == DeviceType.MIBAND4 || gbDevice.getType() == DeviceType.AMAZFITGTR) {
|
||||
prefixlength += 4;
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ public class AmazfitBipSupport extends HuamiSupport {
|
||||
byte[] command = new byte[length + prefixlength + suffixlength];
|
||||
int pos = 0;
|
||||
command[pos++] = (byte) alertCategory.getId();
|
||||
if (gbDevice.getType() == DeviceType.MIBAND4) {
|
||||
if (gbDevice.getType() == DeviceType.MIBAND4 || gbDevice.getType() == DeviceType.AMAZFITGTR) {
|
||||
command[pos++] = 0; // TODO
|
||||
command[pos++] = 0;
|
||||
command[pos++] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user