mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Android: mark BLE only paired devices
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c145cbd754
commit
61fff71391
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue