Advertise the Bluetooth address if the device is discoverable in

either GIAC or LIAC mode.
This commit is contained in:
akwizgran
2011-11-28 15:51:48 +00:00
parent e23f646181
commit b773660bca

View File

@@ -152,7 +152,7 @@ class BluetoothPlugin extends AbstractPlugin implements StreamPlugin {
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.getMessage()); if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.getMessage());
} }
// Advertise the address to contacts if the device is discoverable // Advertise the address to contacts if the device is discoverable
if(localDevice.getDiscoverable() == DiscoveryAgent.GIAC) { if(localDevice.getDiscoverable() != DiscoveryAgent.NOT_DISCOVERABLE) {
TransportProperties p = callback.getLocalProperties(); TransportProperties p = callback.getLocalProperties();
p.put("address", localDevice.getBluetoothAddress()); p.put("address", localDevice.getBluetoothAddress());
callback.setLocalProperties(p); callback.setLocalProperties(p);