| Index: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| index f13635443788c77a8edde52456cad872b9f235ee..f3ecaa6a8cb258af0c04a720da7bd70fa596efca 100644
|
| --- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
|
| @@ -172,17 +172,15 @@ bool BluetoothLowEnergyConnectionFinder::IsRightDevice(
|
|
|
| bool BluetoothLowEnergyConnectionFinder::HasService(
|
| BluetoothDevice* remote_device) {
|
| - if (remote_device) {
|
| - PA_LOG(INFO) << "Device " << remote_device->GetAddress() << " has "
|
| - << remote_device->GetUUIDs().size() << " services.";
|
| - std::vector<device::BluetoothUUID> uuids = remote_device->GetUUIDs();
|
| - for (const auto& service_uuid : uuids) {
|
| - if (remote_service_uuid_ == service_uuid) {
|
| - return true;
|
| - }
|
| - }
|
| + if (!remote_device) {
|
| + return false;
|
| }
|
| - return false;
|
| +
|
| + BluetoothDevice::UUIDSet uuids = remote_device->GetUUIDs();
|
| +
|
| + PA_LOG(INFO) << "Device " << remote_device->GetAddress() << " has "
|
| + << uuids.size() << " services.";
|
| + return base::ContainsKey(uuids, remote_service_uuid_);
|
| }
|
|
|
| void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized(
|
|
|