Merge branch 'master' into release to roll forward to cl/341113126.

This commit is contained in:
hai007
2020-11-06 13:58:02 -08:00
23 changed files with 1216 additions and 79 deletions
+2
View File
@@ -76,6 +76,8 @@ std::string Utils::UnwrapUpgradeServiceId(
LocationHint Utils::BuildLocationHint(const std::string& location) {
LocationHint location_hint;
location_hint.set_format(LocationStandard::UNKNOWN);
if (!location.empty()) {
location_hint.set_location(location);
if (location.at(0) == '+') {
+6
View File
@@ -257,6 +257,12 @@ WifiLanService WifiLan::GetRemoteWifiLanService(const std::string& ip_address,
return medium_.FindRemoteService(ip_address, port);
}
std::pair<std::string, int> WifiLan::GetServiceAddress(
const std::string& service_id) {
MutexLock lock(&mutex_);
return medium_.GetServiceAddress(service_id);
}
} // namespace connections
} // namespace nearby
} // namespace location
+3
View File
@@ -88,6 +88,9 @@ class WifiLan {
WifiLanService GetRemoteWifiLanService(const std::string& ip_address,
int port) ABSL_LOCKS_EXCLUDED(mutex_);
std::pair<std::string, int> GetServiceAddress(const std::string& service_id)
ABSL_LOCKS_EXCLUDED(mutex_);
private:
struct AdvertisingInfo {
bool Empty() const { return service_ids.empty(); }