aboutsummaryrefslogtreecommitdiffstats
path: root/java/direct_bt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-24 01:57:40 +0200
committerSven Gothel <[email protected]>2020-05-24 01:57:40 +0200
commitc760eac8addfda8e63ae213827840d251ecadfa0 (patch)
treebe881d530020295d1e903b62a4388f6ba05d1361 /java/direct_bt
parentfaffa313cc31c184e861d7bee5f932013e2d9d00 (diff)
Add Whitelist to DBTManager/DBTAdapter and test (Result: No auto-connection)
To avoid the hassle with HCI connect/disconnect while scanning, we should test the whitelist supposed to be stored on the adapter to auto-connect. Initial testing didn't show any connection.
Diffstat (limited to 'java/direct_bt')
-rw-r--r--java/direct_bt/tinyb/DBTAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/direct_bt/tinyb/DBTAdapter.java b/java/direct_bt/tinyb/DBTAdapter.java
index 9b60d27b..727503c7 100644
--- a/java/direct_bt/tinyb/DBTAdapter.java
+++ b/java/direct_bt/tinyb/DBTAdapter.java
@@ -240,12 +240,15 @@ public class DBTAdapter extends DBTObject implements BluetoothAdapter
@Override
public synchronized boolean startDiscovery() throws BluetoothException {
+ return startDiscovery(true);
+ }
+ public synchronized boolean startDiscovery(final boolean keepAlive) throws BluetoothException {
removeDevices();
- final boolean res = startDiscoveryImpl();
+ final boolean res = startDiscoveryImpl(keepAlive);
isDiscovering = res;
return res;
}
- private native boolean startDiscoveryImpl() throws BluetoothException;
+ private native boolean startDiscoveryImpl(boolean keepAlive) throws BluetoothException;
@Override
public synchronized boolean stopDiscovery() throws BluetoothException {