Merge branch 'google3' to roll forward up to cl/353971958.

This commit is contained in:
hai007
2021-01-26 16:05:41 -08:00
5 changed files with 38 additions and 4 deletions
+6
View File
@@ -186,6 +186,12 @@ bool Ble::StartScanning(const std::string& service_id,
const std::string& service_id,
const ByteArray& medium_advertisement_bytes,
bool fast_advertisement) {
// Don't bother trying to parse zero byte advertisements.
if (medium_advertisement_bytes.size() == 0) {
NEARBY_LOGS(INFO) << "Skipping zero byte advertisement "
<< "with service_id: " << service_id;
return;
}
// Unwrap connection BleAdvertisement from medium
// BleAdvertisement.
auto connection_advertisement_bytes =