mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Ignore case when comparing Bluetooth UUIDs.
This commit is contained in:
@@ -233,8 +233,6 @@ class BluetoothPlugin extends AbstractPlugin implements StreamPlugin {
|
||||
String address = p.get("address");
|
||||
String uuid = p.get("uuid");
|
||||
if(address != null && uuid != null) {
|
||||
if(LOG.isLoggable(Level.FINE))
|
||||
LOG.fine("Searching for " + uuid + " at " + address);
|
||||
addresses.put(address, c);
|
||||
uuids.put(c, uuid);
|
||||
}
|
||||
|
||||
@@ -81,8 +81,7 @@ class ContactListener implements DiscoveryListener {
|
||||
for(ServiceRecord record : services) {
|
||||
// Do we recognise the address?
|
||||
RemoteDevice device = record.getHostDevice();
|
||||
String address = device.getBluetoothAddress();
|
||||
ContactId c = addresses.get(address);
|
||||
ContactId c = addresses.get(device.getBluetoothAddress());
|
||||
if(c == null) continue;
|
||||
// Do we have a UUID for this contact?
|
||||
String uuid = uuids.get(c);
|
||||
@@ -101,8 +100,6 @@ class ContactListener implements DiscoveryListener {
|
||||
UUID serviceUuid = (UUID) classId.getValue();
|
||||
if(uuid.equalsIgnoreCase(serviceUuid.toString())) {
|
||||
// The UUID matches - store the URL
|
||||
if(LOG.isLoggable(Level.FINE))
|
||||
LOG.fine("Discovered " + uuid + " at " + address);
|
||||
urls.put(c, serviceUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class InvitationListener implements DiscoveryListener {
|
||||
(Enumeration<DataElement>) classIds.getValue();
|
||||
for(DataElement classId : Collections.list(e)) {
|
||||
UUID serviceUuid = (UUID) classId.getValue();
|
||||
if(uuid.equals(serviceUuid.toString())) {
|
||||
if(uuid.equalsIgnoreCase(serviceUuid.toString())) {
|
||||
// The UUID matches - store the URL
|
||||
synchronized(this) {
|
||||
url = serviceUrl;
|
||||
|
||||
Reference in New Issue
Block a user