summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2016-05-31 13:46:46 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-06-01 06:28:17 +0000
commite1a6ad73c5d5c731195967b7f682089da24e1719 (patch)
tree267d4c1126542fc54021af9a7f5ffa27c46740d8
parent968e683a59bdaf51ad0d12069ce68c4fad6190a1 (diff)
Android: Don't progress device search when BTLE search is not supported
This happens when the Android device does not support BTLE. Previously the device search agent progressed even when it claimed that it was done already. Change-Id: If14df70bba02703f5feb8bc9c0569f596defede9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
index d335dc7a..d401fa58 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
@@ -258,6 +258,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::startLowEnergyScan()
env->ExceptionClear();
m_active = NoScanActive;
emit q->finished();
+ return;
}
leScanner.setField<jlong>("qtObject", reinterpret_cast<long>(receiver));
@@ -268,6 +269,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::startLowEnergyScan()
qCWarning(QT_BT_ANDROID) << "Cannot start BTLE device scanner";
m_active = NoScanActive;
emit q->finished();
+ return;
}
if (!leScanTimeout) {