summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/btdiscovery.cpp7
-rw-r--r--core/btdiscovery.h1
2 files changed, 8 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)
{
diff --git a/core/btdiscovery.h b/core/btdiscovery.h
index beabdf122..17790e30c 100644
--- a/core/btdiscovery.h
+++ b/core/btdiscovery.h
@@ -49,6 +49,7 @@ public:
QList<btVendorProduct> getBtDcs();
QBluetoothLocalDevice localBtDevice;
void BTDiscoveryReDiscover();
+ void discoverAddress(QString address);
private:
static BTDiscovery *m_instance;