aboutsummaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-25 20:04:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-12 08:22:44 -0700
commit9491c96103d7be26e3a98245a345adcb9230c035 (patch)
tree03a3746b116928081a1ee8cad0dd5a0697c25a03 /core/btdiscovery.cpp
parent2954bc5f222ff3808a2b51be4a6f1c13f6ca8944 (diff)
downloadsubsurface-9491c96103d7be26e3a98245a345adcb9230c035.tar.gz
Bluetooth: start discovery if address isn't already known
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index e4c17902e..c3f6c9b36 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -301,6 +301,13 @@ bool BTDiscovery::checkException(const char* method, const QAndroidJniObject *ob
}
#endif // Q_OS_ANDROID
+void BTDiscovery::discoverAddress(QString address)
+{
+ if (!btDeviceInfo.keys().contains(address) && !discoveryAgent->isActive()) {
+ qDebug() << "restarting discovery agent";
+ discoveryAgent->start();
+ }
+}
bool isBluetoothAddress(const QString &address)
{