summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-02-10 13:52:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 11:11:10 +0100
commit7fde60d9bedb815b66d374328d6535d10c701775 (patch)
tree826422438d2fcb3af8d29f51b9a0bc8c8f8c4c33 /src
parentf33353f2a5ddd7ed371ab97d5330bc594cf03dda (diff)
Fix interaction with Android devices
The custom uuid of a Serial port profile must be part of the service class property. This enables Android to find the custom uuid. Change-Id: Ibe0bfcfe6ba7fa6b72a979153afccf17d6b4eb83 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothserver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothserver.cpp b/src/bluetooth/qbluetoothserver.cpp
index e70ec1db..fbb688ec 100644
--- a/src/bluetooth/qbluetoothserver.cpp
+++ b/src/bluetooth/qbluetoothserver.cpp
@@ -207,10 +207,12 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const
QBluetoothServiceInfo::Sequence classId;
classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
- serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList,
classId);
+ //Android requires custom uuid to be set as service class
+ classId.prepend(QVariant::fromValue(uuid));
+ serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId);
serviceInfo.setServiceUuid(uuid);
QBluetoothServiceInfo::Sequence protocolDescriptorList;