Roll forward to cl/331498408

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I21206f5720b0805f8c08e6604fc3b1fe08592046
This commit is contained in:
Alexey Polyudov
2020-09-14 02:06:02 -07:00
parent fd773bd431
commit 3cadfac2f4
41 changed files with 2251 additions and 81 deletions
+10 -4
View File
@@ -36,7 +36,8 @@ bool Ble::IsAvailable() const {
bool Ble::IsAvailableLocked() const { return medium_.IsValid(); }
bool Ble::StartAdvertising(const std::string& service_id,
const ByteArray& advertisement_bytes) {
const ByteArray& advertisement_bytes,
const std::string& fast_advertisement_service_uuid) {
MutexLock lock(&mutex_);
if (advertisement_bytes.Empty()) {
@@ -73,12 +74,17 @@ bool Ble::StartAdvertising(const std::string& service_id,
NEARBY_LOGS(INFO) << "Turning on BLE advertising with advertisement bytes="
<< advertisement_bytes.data() << "("
<< advertisement_bytes.size() << ")"
<< ", service id=" << service_id;
if (!medium_.StartAdvertising(service_id, advertisement_bytes)) {
<< ", service id=" << service_id
<< ", fast advertisement service uuid="
<< fast_advertisement_service_uuid;
if (!medium_.StartAdvertising(service_id, advertisement_bytes,
fast_advertisement_service_uuid)) {
NEARBY_LOGS(INFO)
<< "Failed to turn on BLE advertising with advertisement bytes="
<< advertisement_bytes.data() << "(" << advertisement_bytes.size()
<< ")";
<< ")"
<< ", fast advertisement service uuid="
<< fast_advertisement_service_uuid;
return false;
}