Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: components/pairing/bluetooth_controller_pairing_controller.cc

Issue 2888033002: Devices shoule not be found by Android enrollment app after successful enrollment. (Closed)
Patch Set: Add UUID as filter when detecting devices. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/pairing/bluetooth_host_pairing_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pairing/bluetooth_controller_pairing_controller.cc
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc
index b8c9d0a080f537ab83d8b8beacc5b8f55c0c1275..40f9e763217045d2a81587be53d591382b081a9c 100644
--- a/components/pairing/bluetooth_controller_pairing_controller.cc
+++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -72,9 +72,12 @@ void BluetoothControllerPairingController::DeviceFound(
device::BluetoothDevice* device) {
DCHECK_EQ(current_stage_, STAGE_DEVICES_DISCOVERY);
DCHECK(thread_checker_.CalledOnValidThread());
+
+ device::BluetoothDevice::UUIDSet uuids = device->GetUUIDs();
if (base::StartsWith(device->GetNameForDisplay(),
base::ASCIIToUTF16(kDeviceNamePrefix),
- base::CompareCase::INSENSITIVE_ASCII)) {
+ base::CompareCase::INSENSITIVE_ASCII) &&
+ base::ContainsKey(uuids, device::BluetoothUUID(kPairingServiceUUID))) {
discovered_devices_.insert(device->GetAddress());
for (ControllerPairingController::Observer& observer : observers_)
observer.DiscoveredDevicesListChanged();
« no previous file with comments | « no previous file | components/pairing/bluetooth_host_pairing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698