From cd2d7d144e7dc8e68b0ca345bb1f45fd7fd0c99d Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Fri, 20 Oct 2023 17:45:23 +0200 Subject: [PATCH] Xiaomi: Fix unencrypted support again --- .../gadgetbridge/service/devices/xiaomi/XiaomiSupport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/XiaomiSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/XiaomiSupport.java index 5c0581272..fd32068df 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/XiaomiSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/XiaomiSupport.java @@ -124,12 +124,12 @@ public abstract class XiaomiSupport extends AbstractBTLEDeviceSupport { this.characteristicCommandRead.setEncrypted(isEncrypted()); this.characteristicCommandRead.setHandler(this::handleCommandBytes); this.characteristicCommandWrite = new XiaomiCharacteristic(this, btCharacteristicCommandWrite, authService); - this.characteristicCommandRead.setEncrypted(isEncrypted()); + this.characteristicCommandWrite.setEncrypted(isEncrypted()); this.characteristicActivityData = new XiaomiCharacteristic(this, btCharacteristicActivityData, authService); this.characteristicActivityData.setHandler(healthService.getActivityFetcher()::addChunk); - this.characteristicCommandRead.setEncrypted(isEncrypted()); + this.characteristicActivityData.setEncrypted(isEncrypted()); this.characteristicDataUpload = new XiaomiCharacteristic(this, btCharacteristicDataUpload, authService); - this.characteristicCommandRead.setEncrypted(isEncrypted()); + this.characteristicDataUpload.setEncrypted(isEncrypted()); builder.requestMtu(247);