diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-06-29 22:53:07 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-30 13:13:38 -0700 |
commit | 61fff71391ceef0840dadc95f78b586e6f2be6a3 (patch) | |
tree | 506422b2468eaacb5cd340385848647193654132 /core/btdiscovery.cpp | |
parent | c145cbd75444508d3a48e8b363abbbb52eb5ed12 (diff) | |
download | subsurface-61fff71391ceef0840dadc95f78b586e6f2be6a3.tar.gz |
Android: mark BLE only paired devices
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r-- | core/btdiscovery.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 1326b175b..e99fff6ee 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -217,10 +217,12 @@ void BTDiscovery::getBluetoothDevices() if (checkException("Iterator<BluetoothDevice>.next()", &dev)) { continue; } - + jint btType = dev.callMethod<jint>("getType", "()I"); result.address = dev.callObjectMethod("getAddress","()Ljava/lang/String;").toString(); + if (btType == 2) // DEVICE_TYPE_LE + result.address = QString("LE:%1").arg(result.address); result.name = dev.callObjectMethod("getName", "()Ljava/lang/String;").toString(); - + qDebug() << "paired Device type" << btType << "with address" << result.address; btPairedDevices.append(result); } } |