mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Deprecate kEnableWifiLanAddressCandidates flag.
PiperOrigin-RevId: 871447144
This commit is contained in:
committed by
Copybara-Service
parent
306e5df90a
commit
f42933f7d9
@@ -772,21 +772,10 @@ api::UpgradeAddressInfo WifiLanMedium::GetUpgradeAddressCandidates(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (NearbyFlags::GetInstance().GetBoolFlag(
|
||||
platform::config_package_nearby::nearby_platform_feature::
|
||||
kEnableWifiLanAddressCandidates)) {
|
||||
// Append v4 addresses to the end of the list.
|
||||
result.address_candidates.insert(result.address_candidates.end(),
|
||||
ipv4_addresses.begin(),
|
||||
ipv4_addresses.end());
|
||||
} else {
|
||||
// If kEnableWifiLanAddressCandidates is disabled, only return the last v4
|
||||
// address.
|
||||
result.address_candidates.clear();
|
||||
if (!ipv4_addresses.empty()) {
|
||||
result.address_candidates.push_back(ipv4_addresses.back());
|
||||
}
|
||||
}
|
||||
// Append v4 addresses to the end of the list.
|
||||
result.address_candidates.insert(result.address_candidates.end(),
|
||||
ipv4_addresses.begin(),
|
||||
ipv4_addresses.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user