Report probe URL as redirect on 200 portals
On portals that return HTTP 200 with a login page instead of a redirect, report the probe URL instead of null as the login URL. NetworkMonitor already falls back to the probe URL to open the captive portal app when the redirect URL is empty. This only affects the result reported to ConnectivityService in handleNetworkTested, which is only used to transmit to the NetworkAgent in onValidationStatusChanged. This means that starting from S, NetworkAgents will also see a redirect URL on 200 portals, instead of a failed validation (null URL) as before. The change does not affect R and earlier as behavior of ConnectivityService and NetworkAgents is OEM-specific and may lead to unexpected results. Bug: 172048052 Test: atest NetworkStackTests Change-Id: I4c68bfc9ae8aa38d73bc62443ac923f07ee1ed46
Loading