Have NetworkMonitor treat as-is networks as validated.
When the captive portal app reports the network should be used as-is (typically when there was an SSL error and the user chose to "continue anyway via browser"), have NetworkMonitor mark the network as validated and partial connectivity. This slightly violates the letter of the documentation for VALIDATED, but not the spirit. Subsequent attempts to revalidate will also result in a result of VALIDATED, until the network is disconnected or the captive portal opens. Nothing triggers a new validation though, so this will only happen if an app calls reportNetworkConnectivity. The network is still usable in the mean time. The validation result is sent immediately as the user taps the "continue anyway" button. NetworkMonitor then proceeds to perform private DNS validation, and when the full sequence of validation is finished it will send another validation result, very likely with the same values. This shows a "connected" notification as the user taps on "continue anyway via browser", which may be slightly unexpected but is correct, so it's probably fine. If Private DNS is in strict mode but can't be accessed after the user decides to use as is, a notification is shown to warn the user that the Private DNS server can't be accessed. If private DNS settings are changed, they are reevaluated as normal. Bug: 168431719 Test: new unit test included also manually tested Change-Id: I2e6cf5f840891453cd5587a42d907c90f15f20e7
Loading