diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2022-05-05 11:42:06 +0300 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@insta.fi> | 2022-05-12 09:06:30 +0300 |
commit | bb419a4c608b94ff311e1609306f5f0fbc59d3cf (patch) | |
tree | a735ca36c76a40809e3d51c5185dbae967cc275e /examples | |
parent | ec04d3db1d095ddbe0e0c98d2d4becb23cccadb3 (diff) |
Remove unsupported Android bluetooth codepaths
Minimum Android level supported on Qt 6 is Android 6 / API Level 23.
This commit removes older unsupported code in order to simplify.
This concerns primarily:
- sdkVersion() checks
- Java reflections (API availability was uncertain)
Task-number: QTBUG-102497
Pick-to: 6.2 6.3
Change-Id: Ia90248a0a8f8e32130b8394998c2676c97a02eb5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bluetooth/btchat/chat.cpp | 7 | ||||
-rw-r--r-- | examples/bluetooth/pingpong/pingpong.cpp | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/examples/bluetooth/btchat/chat.cpp b/examples/bluetooth/btchat/chat.cpp index 7fb84ca0..51723813 100644 --- a/examples/bluetooth/btchat/chat.cpp +++ b/examples/bluetooth/btchat/chat.cpp @@ -200,10 +200,9 @@ void Chat::connectClicked() RemoteSelector remoteSelector(adapter); #ifdef Q_OS_ANDROID - if (QNativeInterface::QAndroidApplication::sdkVersion() >= 23) - remoteSelector.startDiscovery(QBluetoothUuid(reverseUuid)); - else - remoteSelector.startDiscovery(QBluetoothUuid(serviceUuid)); + // QTBUG-61392 + Q_UNUSED(serviceUuid); + remoteSelector.startDiscovery(QBluetoothUuid(reverseUuid)); #else remoteSelector.startDiscovery(QBluetoothUuid(serviceUuid)); #endif diff --git a/examples/bluetooth/pingpong/pingpong.cpp b/examples/bluetooth/pingpong/pingpong.cpp index 8053fe4e..f3ee70a4 100644 --- a/examples/bluetooth/pingpong/pingpong.cpp +++ b/examples/bluetooth/pingpong/pingpong.cpp @@ -291,11 +291,9 @@ void PingPong::startClient() this, &PingPong::done); connect(discoveryAgent, &QBluetoothServiceDiscoveryAgent::errorOccurred, this, &PingPong::serviceScanError); -#ifdef Q_OS_ANDROID //see QTBUG-61392 - if (QNativeInterface::QAndroidApplication::sdkVersion() >= 23) - discoveryAgent->setUuidFilter(QBluetoothUuid(androidUuid)); - else - discoveryAgent->setUuidFilter(QBluetoothUuid(serviceUuid)); +#ifdef Q_OS_ANDROID + // QTBUG-61392 + discoveryAgent->setUuidFilter(QBluetoothUuid(androidUuid)); #else discoveryAgent->setUuidFilter(QBluetoothUuid(serviceUuid)); #endif |