diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-01-04 11:14:30 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-01-23 11:09:26 +0000 |
commit | eaec158cf7ea2a62e79afd87701384830dee599d (patch) | |
tree | 7a56c42df37391a5e752a8e05e490dce8c4fbf01 /src/bluetooth/android/lowenergynotificationhub.cpp | |
parent | d66b34100ad3e5ddd226ba85c4e974ad08e22205 (diff) |
Android: Keep track of peripheral advertisement errors
If advertisement fails then we drop back into the unconnected state
and provide a more detailed error message for individual advertisement
errors.
Change-Id: Ic9de02b456409cd1a2dec11e53c884fe368ae267
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/android/lowenergynotificationhub.cpp')
-rw-r--r-- | src/bluetooth/android/lowenergynotificationhub.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bluetooth/android/lowenergynotificationhub.cpp b/src/bluetooth/android/lowenergynotificationhub.cpp index 219124fa..d6e0a4f1 100644 --- a/src/bluetooth/android/lowenergynotificationhub.cpp +++ b/src/bluetooth/android/lowenergynotificationhub.cpp @@ -309,4 +309,17 @@ void LowEnergyNotificationHub::lowEnergy_serviceError( (QLowEnergyService::ServiceError)errorCode)); } +void LowEnergyNotificationHub::lowEnergy_advertisementError( + JNIEnv *, jobject, jlong qtObject, jint status) +{ + lock.lockForRead(); + LowEnergyNotificationHub *hub = hubMap()->value(qtObject); + lock.unlock(); + if (!hub) + return; + + QMetaObject::invokeMethod(hub, "advertisementError", Qt::QueuedConnection, + Q_ARG(int, status)); +} + QT_END_NAMESPACE |