diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/direct_bt/tinyb/DBTAdapter.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/direct_bt/tinyb/DBTAdapter.java b/java/direct_bt/tinyb/DBTAdapter.java index 549de9bf..d3e42fab 100644 --- a/java/direct_bt/tinyb/DBTAdapter.java +++ b/java/direct_bt/tinyb/DBTAdapter.java @@ -342,10 +342,8 @@ public class DBTAdapter extends DBTObject implements BluetoothAdapter @Override public boolean stopDiscovery() throws BluetoothException { synchronized( discoveryLock ) { - if( isDiscovering.get() ) { - return stopDiscoveryImpl(); // event callbacks will be generated by implementation - } - return true; + // Ignoring 'isDiscovering', be consistent with startDiscovery + return stopDiscoveryImpl(); // event callbacks will be generated by implementation } } private native boolean stopDiscoveryImpl() throws BluetoothException; |