[Nearby] Use fast advertisement UUID in BLE scanning
A recent uprev of Nearby Connections introduced passing the fast advertisement service UUID into BleMedium::StartScanning(). (See its introduction in cl/332425345.) This can eventually be used to filter incoming Nearby BLE advertisements; the other argument to StartScanning(), service_id, is just a bare string like "NearbySharing", and therefore cannot be a filter. In this CL, we do the following: (1) Within BleMedium, use fast_advertisement_service_uuid as the actual UUID, not service_id. (2) Because BlePeripheral::GetAdvertisementBytes() still uses service_id as its lone parameter, pass the one-to-one map of service_id to fast_advertisement_service_uuid. With that mapping, the BlePeripheral::GetAdvertisementBytes() can understand which UUID to use given an input service_id. Fixed: 1131974 Change-Id: I7b245176930e803ea0524b9d77a794cd6cfbc504 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436788 Commit-Queue: Josh Nohle <nohle@chromium.org> Commit-Queue: Ryan Hansberry <hansberry@chromium.org> Auto-Submit: Josh Nohle <nohle@chromium.org> Reviewed-by:Ryan Hansberry <hansberry@chromium.org> Cr-Commit-Position: refs/heads/master@{#812399}
Showing
Please register or sign in to comment