diff options
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_android.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_android.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp index 992427ff..f48c0e85 100644 --- a/src/bluetooth/qlowenergycontroller_android.cpp +++ b/src/bluetooth/qlowenergycontroller_android.cpp @@ -80,6 +80,8 @@ void QLowEnergyControllerPrivate::connectToDevice() this, &QLowEnergyControllerPrivate::descriptorWritten); connect(hub, &LowEnergyNotificationHub::characteristicChanged, this, &QLowEnergyControllerPrivate::characteristicChanged); + connect(hub, &LowEnergyNotificationHub::serviceError, + this, &QLowEnergyControllerPrivate::serviceError); } if (!hub->javaObject().isValid()) { @@ -563,6 +565,10 @@ void QLowEnergyControllerPrivate::characteristicChanged( void QLowEnergyControllerPrivate::serviceError( int attributeHandle, QLowEnergyService::ServiceError errorCode) { + // ignore call if it isn't really an error + if (errorCode == QLowEnergyService::NoError) + return; + QSharedPointer<QLowEnergyServicePrivate> service = serviceForHandle(attributeHandle); Q_ASSERT(!service.isNull()); |