diff --git a/internal/platform/flags/nearby_platform_feature_flags.h b/internal/platform/flags/nearby_platform_feature_flags.h index 00e9d9f1..9259140b 100644 --- a/internal/platform/flags/nearby_platform_feature_flags.h +++ b/internal/platform/flags/nearby_platform_feature_flags.h @@ -53,6 +53,10 @@ constexpr auto kWifiHotspotConnectionIntervalMillis = constexpr auto kWifiHotspotConnectionTimeoutMillis = flags::Flag(kConfigPackage, "45415888", 10000); +// Enable/Disable DHCP renewal when connecting to hotspot. +constexpr auto kEnableHotspotDhcpRenew = + flags::Flag(kConfigPackage, "45731858", false); + // Enable/Disable Intel PIe SDK to query/set WIFI feature. constexpr auto kEnableIntelPieSdk = flags::Flag(kConfigPackage, "45428547", false); diff --git a/internal/platform/implementation/windows/wifi_hotspot_medium.cc b/internal/platform/implementation/windows/wifi_hotspot_medium.cc index 037c148d..951e1459 100644 --- a/internal/platform/implementation/windows/wifi_hotspot_medium.cc +++ b/internal/platform/implementation/windows/wifi_hotspot_medium.cc @@ -449,8 +449,11 @@ bool WifiHotspotMedium::ConnectWifiHotspot( LOG(INFO) << "Check IP address at attempt " << i; if (!wifi_hotspot_native_.HasAssignedAddress()) { - // TODO: ftsui - Add flag to control this. - wifi_hotspot_native_.RenewIpv4Address(); + if (NearbyFlags::GetInstance().GetBoolFlag( + platform::config_package_nearby::nearby_platform_feature:: + kEnableHotspotDhcpRenew)) { + wifi_hotspot_native_.RenewIpv4Address(); + } Sleep(ip_address_retry_interval_millis); continue; }