diff options
Diffstat (limited to 'src/bluetooth/android/devicediscoverybroadcastreceiver.cpp')
-rw-r--r-- | src/bluetooth/android/devicediscoverybroadcastreceiver.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/bluetooth/android/devicediscoverybroadcastreceiver.cpp b/src/bluetooth/android/devicediscoverybroadcastreceiver.cpp index 1fec7f81..caaabadf 100644 --- a/src/bluetooth/android/devicediscoverybroadcastreceiver.cpp +++ b/src/bluetooth/android/devicediscoverybroadcastreceiver.cpp @@ -595,14 +595,10 @@ QBluetoothDeviceInfo DeviceDiscoveryBroadcastReceiver::retrieveDeviceInfo(const env->ReleaseByteArrayElements(scanRecord, elems, JNI_ABORT); } - if (QNativeInterface::QAndroidApplication::sdkVersion() >= 18) { - auto methodId = env.findMethod(bluetoothDevice.objectClass(), - "getType", - "()I"); - jint javaBtType = env->CallIntMethod(bluetoothDevice.object(), methodId); - if (!env.checkAndClearExceptions()) { - info.setCoreConfigurations(qtBtTypeForJavaBtType(javaBtType)); - } + auto methodId = env.findMethod(bluetoothDevice.objectClass(), "getType", "()I"); + jint javaBtType = env->CallIntMethod(bluetoothDevice.object(), methodId); + if (!env.checkAndClearExceptions()) { + info.setCoreConfigurations(qtBtTypeForJavaBtType(javaBtType)); } return info; |