1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-09 03:37:03 +01:00

Huawei: Fix for Huawei Band 9

Linked to #3784.
This commit is contained in:
Martin.JM 2024-08-06 12:04:05 +02:00 committed by José Rebelo
parent dd93133168
commit f15f60542d
2 changed files with 6 additions and 2 deletions

View File

@ -81,7 +81,10 @@ public abstract class HuaweiLECoordinator extends AbstractBLEDeviceCoordinator i
@Override
public int[] getSupportedDeviceSpecificAuthenticationSettings() {
return new int[]{R.xml.devicesettings_huawei_account};
return new int[]{
R.xml.devicesettings_huawei_account,
R.xml.devicesettings_miband6_new_protocol
};
}
@Override

View File

@ -529,7 +529,8 @@ public class HuaweiSupportProvider {
if (isBLE()) {
leBuilder = createLeTransactionBuilder("Initializing");
leBuilder.setCallback(leSupport);
leBuilder.notify(leSupport.getCharacteristic(HuaweiConstants.UUID_CHARACTERISTIC_HUAWEI_READ), true);
if (!GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()).getBoolean("force_new_protocol", false))
leBuilder.notify(leSupport.getCharacteristic(HuaweiConstants.UUID_CHARACTERISTIC_HUAWEI_READ), true);
leBuilder.add(new nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateAction(gbDevice, GBDevice.State.INITIALIZING, context));
} else {
brBuilder = createBrTransactionBuilder("Initializing");