mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
internal bug fix
PiperOrigin-RevId: 704819636
This commit is contained in:
committed by
Copybara-Service
parent
2352d73b41
commit
8979083e31
@@ -453,6 +453,15 @@ void P2pClusterPcpHandler::BluetoothNameChangedHandler(
|
||||
<< ", service_id=" << service_id
|
||||
<< "]: processing new name " << device_name_string;
|
||||
|
||||
// Make sure the Bluetooth device name points to a valid
|
||||
// endpoint we're discovering.
|
||||
if (!IsRecognizedBluetoothEndpoint(device_name_string, service_id,
|
||||
device_name)) {
|
||||
NEARBY_LOGS(INFO) << "Found unrecognized BluetoothDeviceName "
|
||||
<< device_name_string;
|
||||
return;
|
||||
}
|
||||
|
||||
// By this point, the BluetoothDevice passed to us has a different
|
||||
// name than what we may have discovered before. We need to iterate
|
||||
// over the found BluetoothEndpoints and compare their addresses to
|
||||
@@ -482,15 +491,6 @@ void P2pClusterPcpHandler::BluetoothNameChangedHandler(
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the Bluetooth device name points to a valid
|
||||
// endpoint we're discovering.
|
||||
if (!IsRecognizedBluetoothEndpoint(device_name_string, service_id,
|
||||
device_name)) {
|
||||
NEARBY_LOGS(INFO) << "Found unrecognized BluetoothDeviceName "
|
||||
<< device_name_string;
|
||||
return;
|
||||
}
|
||||
|
||||
// Report the discovered endpoint to the client.
|
||||
NEARBY_LOGS(INFO) << "Found BluetoothDeviceName " << device_name_string
|
||||
<< " (with endpoint_id="
|
||||
|
||||
Reference in New Issue
Block a user