diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-07-25 15:39:21 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2016-08-01 13:11:16 +0000 |
commit | 66fc8db55e03648f1c65dcbeb58ff8f06e10f6f5 (patch) | |
tree | 582201a075bc54f036f23f3e471e9d978ef5b765 /src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp | |
parent | 71a0d199a29001cc31bfde15aabcc53cf88aae1e (diff) |
Android: Device discovery doesn't provide major & minor device class info
QBluetoothDeviceDiscoveryAgent did not extract the
QBluetoothDeviceInfo::majorDeviceClass() and QBluetoothDeviceInfo::minorDeviceClass()
information.
The Android API provides info for all major device classes. However not each
major device class has its set of API for the minor device class information.
Caching is applied to match Android major device class values against their matching
Qt enum. When a matching entry is found, the value is added to the cache.
In principle, the mechanism is applied for minor device class values.
However since there are many many more minor device class fields, the caching
is a bit more proactive. The patch will proactively read and cache all minor
device class values for a given major device class. This avoids a large
overhead of very long if..else if...else if..else statements.
Change-Id: I26a6c29c6f5dca6d4f3b4b25902cda03a10ae5de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp')
0 files changed, 0 insertions, 0 deletions