mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Amazfit GTR: Enforce auth key input when pairing, try to fix notifications
This commit is contained in:
+5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user