BangleJSDeviceSupport: fix setUpdateState

This commit is contained in:
Thomas Kuehne
2025-06-22 14:46:50 +02:00
committed by José Rebelo
parent c9a9ae8ad0
commit 280f4fc61d
@@ -361,8 +361,7 @@ public class BangleJSDeviceSupport extends AbstractBTLESingleDeviceSupport {
sleepAsAndroidSender = new SleepAsAndroidSender(gbDevice);
}
gbDevice.setState(GBDevice.State.INITIALIZING);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
rxCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_RX);
txCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_TX);
@@ -389,8 +388,7 @@ public class BangleJSDeviceSupport extends AbstractBTLESingleDeviceSupport {
//sendSettings(builder);
// get version
gbDevice.setState(GBDevice.State.INITIALIZED);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
if (getDevice().getFirmwareVersion() == null) {
getDevice().setFirmwareVersion("N/A");
getDevice().setFirmwareVersion2("N/A");