| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Update instance of old code using JNI_VERSION_1_4 to make the code
consistent.
Change-Id: I79bf1dc18c45dbdfe6e246e396adcf856dfee63f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qbluetoothdevicediscoveryagent_darwin.mm
src/bluetooth/qbluetoothserver_osx.mm
src/bluetooth/qbluetoothserviceinfo_osx.mm
src/bluetooth/qbluetoothsocket_osx.mm
Change-Id: I24485ae835560fa1e57007fb684f6532db3e7922
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The user has to enter a pin in such cases. Since QBluetoothLocalDevice
does not have an API to return a pin it makes no sense for QtBluetooth
to handle this type of request. Android will provide its own fall back
form.
This patch is mostly a revert of f8c0572ddcd.
Fixes: QTBUG-76565
Task-number: QTBUG-70295
Change-Id: I61062ac84ce508f3b82c7359a60d5c9c5bba86a4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|/
|
|
|
|
|
| |
The related functions were deprecated by fac56a229b45395488f3e41bf178361c72b3ee1e.
Change-Id: Ia94b1824bb6ea7d1a8e3bb8eb5e82074e9facb7a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
| |
Change-Id: Ide883a3c354eb42ea0017e1d623843967b522083
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
happens due to accessing already destroyed receiver from the queued call
Change-Id: Ibc4a9abbb8c00ef9c8985f481b70db36fa508df8
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The device address is essential for proper processing of
pairingDisplayConfirmation() signal on Android. If it is not available
abort immediately. This brings the passkey pairing code in line with
pincode pairing.
Change-Id: I174a2478d48463c58ba937e71ced377d45892f1a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Most likely this paring variant was forgotten when Android support
for QBluetoothLocalDevice was implemented. This variant is rather uncommon
and Android's default pairing handler are likely to automatically
handle such requests too.
Fixes: QTBUG-70295
Change-Id: I618242da415574245e5a213a6e34f190c685c8e9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothLocalDevice::pairingConfirmation(bool) requires
BLUETOOTH_PRIVILEGED permission which cannot be obtained by 3rdparty
apps. I believe this used to be different as suggested by
https://android.googlesource.com/platform/frameworks/base/+/b1dc1757071ba46ee653d68f331486e86778b8e4
This patch ensures that the thrown SecurityException is caught and displays
an appropriate warning.
Change-Id: Ib5a0e0fc0c9f3b4f33690493ed74aa4b7cb8864b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: I7dd2d055c8d667f049d7cb2c371619137bf76030
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
| |
The initial patch was contributed by Thiemo van Engelen.
Change-Id: I45fad793ba092ab2820e606d8bf8807afa3e911e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-68550
Change-Id: Iac05cccd4f6e1b44a30568fb9b6c9171204b53fd
Reviewed-by: Lubomir I. Ivanov <neolit123@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
| |
Change-Id: I3fc082b42b6d56890039b482643ed41b9c9456ce
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/bluetooth.pro
Change-Id: Ibccccc974b545696ae053f1fbffcc973d8be43cc
|
| |
| |
| |
| |
| |
| | |
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ia98a7a16c3e1e478d1c6e30d9e70dc703c1fe091
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|/
|
|
|
| |
Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and deprecate the former. By doing so we get the header
file in line with other modules - see qtnetworkglobal.h for
example.
The include is not used in the examples so it is removed
there.
Change-Id: Ie6267738d4a45e45a0350d458a40654d8a952f4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I7a55929aefa1f7a4dc96f841317b78b248899f67
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Android, the socket's read buffer is managed in the Java thread.
QBluetoothSocket::canReadLine() is public API (most likely) being called
by in the main Qt thread though. The function directly called into the
Java buffer instance without proper locking. This can create race conditions.
Starting with this patch canReadLine() calls another QBluetoothSocketPrivate
indirection to allow a platform specific implementation. This affects
WinRT, BlueZ and the dummy backend too.
This is not an issue on macOS as its implementation of QBluetoothSocket
is separate and does not have to deal with multiple
QBluetoothSocketPrivate implementations.
Task-number: QTBUG-58190
Task-number: QTBUG-60830
Change-Id: Idae19f1aee6f809699d36519b01a3c68ad9c563d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
src/bluetooth/android/devicediscoverybroadcastreceiver.cpp:240: warning: Cannot tie this documentation to anything
[I found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.]
The file referenced in the warning does not contribute to the QtBluetooth
documentation. The patch removes qdoc annotation from the file.
Change-Id: Ie5699d79a12e5fc1851a924adbf50ebcb5059454
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|/
|
|
|
| |
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3aa89926c5237ee8da18b73f66f0c7a321a83c91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
| |
Change-Id: I60e5bdce4256804754909c2538aebe581897e1e9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
| |
Emits the above signal when the remote client successfully updates
a characteristic.
Change-Id: I236b1f92b682028bc10be798192f46bffc981101
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: Id2cabd9df7b5387fe5e6f1c898fe02e40f7c0a3d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Focus is on the Java side of things. The Gatt server & LE advertiser
can be started and stopped.
This patch builds the foundation for future changes. The C++ side is only
very rudimentary and a lot of debugging helper are left inside the
new code sections.
Change-Id: Ic56da3ec6471ccb438fc2088fbf5eeb3053d5cf1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
in f945ffc90f8f11d73dc87f2d82bb2d246d446e71, a very basic
scanRecord parser has been added, which calls GetByteArrayElements
without releasing the elemnts, causing JNI core exception
> E/dalvikvm: Failed adding to JNI pinned array ref table (1023 entries)
Change-Id: I272593c232f0c87c1983f1f568aa6c3599d44253
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the advertising packet (scan record) received from BLE devices
during scanning on Android devices is ignored. Consequently, the
serviceUuids() method of the QBluetoothDeviceInfo class returns an empty
list for BLE devices. However, this list provides important information needed
by clients to identify whether a given device is of interest.
This changeset implements parsing of the scan record received from the
Android Bluetooth layer. The Java byte array is passed over JNI to the
C++ adapter classes, where it's parsed to find any service UUIDs being
advertised by the device.
Parsing the scan record ourselves is required for compatibility (Qt uses
"old-style" LE scan API from Android api level 18.)
All found UUIDs are added to a list which is subsequently passed to the
user of the QBluetoothDeviceDiscoveryAgent class via the
deviceDiscovered(QBluetoothDeviceInfo&) signal.
Note: not all Android devices pass the full advertisement data. The
service UUID list may be empty in those cases.
[ChangeLog][QtBluetooth][Android] Parse list of advertised services found in
LE scan record and pass them to API client via
QBluetoothDeviceInfo::serviceUuids()
Task-number: QTBUG-56625
Change-Id: I253f1b841c7b15b3bbabc9e478de87c81979815e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
| |
Change-Id: Ibe1871578394fa1e0f039425036ab0dd5223be49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\
| |
| |
| | |
Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: Ic0814c3f5a65ce9ac9236c41397400fc42abb572
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ibde0242b058f728fd7e060b37f427c208325db13
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: I64352b6cc066255972874e2f9c28abff35f0d613
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Android 5.0 Google introduce a nasty bug[1] which calls
JNI_OnLoad more than once.
Basically every time when a library is loaded JNI_OnLoad is
called if found, but it calls *again* JNI_OnLoad of its .so
dependencies!
[1] Workaround https://code.google.com/p/android/issues/detail?id=215069
Change-Id: I2894dd24afa9c51582f20ab44d83e9ce86751716
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/bluetooth/qlowenergycontroller_bluez.cpp
Change-Id: I00f45a2a22a045e7836f2caeb76cc5599ced6279
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-50345
Change-Id: I721b98f9b6ccff2a987a6c477d08902332ce848c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Braodcast -> Broadcast
subsequemtly -> subsequently
discovred -> discovered
Change-Id: I1e9d83bb0b33ad15da1f05d8a7cdd8ba82232f42
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I4e78a2b263fb779253556201fd20fe47a2afc58e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove Q_ENUMS in favor of the new Q_ENUM macro which provides
registration as meta enum and a debug stream operator.
Register some enums via Q_ENUM to improve debug output
and types auto-registration.
Change-Id: I31c9535a2de7da1783b4ec967612c02a57cb62ff
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I5652075b4fde4d4927e86f5394baf176f263104f
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
|\
| |
| |
| | |
Change-Id: Ia70c3fe64e2ffcb27181bf912b06e6af59d2bc92
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The required API became public in Android v19 which is what was used as
check so far. However the same API was already privately provided
since Android v15. THis patch ensures that older Android versions
can create pairing requests too.
This patch was provided by George Najarian.
Task-number: QTBUG-43757
Change-Id: I0f38e538a972341a6acf719098f1010e52b639b7
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is much safer and cleaner.
[ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE
added for QBluetoothServiceDiscoveryAgent::Error,
QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and
QBluetoothDeviceInfo. This breaks source compatibility if application
code has defined the above metatypes already. The applications
Q_DECLARE_METATYPE must be removed to fix the compile error.
Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I4c50df7d758390989c2e2127f7646e5d2dc34712
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I1c7f0491506c6f0512d097a419660c5f5e7fb144
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|