Deprecate kEnableWifiLanAddressCandidates flag.

PiperOrigin-RevId: 871447144
This commit is contained in:
Francis Tsui
2026-02-17 12:38:45 -08:00
committed by Copybara-Service
parent 306e5df90a
commit f42933f7d9
2 changed files with 4 additions and 19 deletions
@@ -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;
}