diff options
author | Chiachang Wang <chiachangwang@google.com> | 2020-04-06 02:29:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-04-06 02:29:56 +0000 |
commit | d1ec74f58891584fc68587127e28ccf4877b45e8 (patch) | |
tree | 1bdf407f24f23113ffbfb0e7dc8b00d1ae49f22d /src/android/net/util/NetworkStackUtils.java | |
parent | 74d48f7229803dfb0b58c7039a532b49d7b584d7 (diff) | |
parent | 2a4deaf3457248bd7ffe842a383902387834f4fe (diff) |
Merge changes Ifdf54ace,Ib2c1d16d into rvc-dev
* changes:
[MP02] Make multiple probe url configration overlayable
[MP01] Add configuration to support multiple probes
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rw-r--r-- | src/android/net/util/NetworkStackUtils.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java index 9d913fc..bc41549 100644 --- a/src/android/net/util/NetworkStackUtils.java +++ b/src/android/net/util/NetworkStackUtils.java @@ -56,6 +56,18 @@ public class NetworkStackUtils { "captive_portal_other_fallback_urls"; /** + * A comma separated list of URLs used for captive portal detection in addition to the HTTP url + * associated with the CAPTIVE_PORTAL_HTTP_URL settings. + */ + public static final String CAPTIVE_PORTAL_OTHER_HTTP_URLS = "captive_portal_other_http_urls"; + + /** + * A comma separated list of URLs used for network validation. in addition to the HTTPS url + * associated with the CAPTIVE_PORTAL_HTTPS_URL settings. + */ + public static final String CAPTIVE_PORTAL_OTHER_HTTPS_URLS = "captive_portal_other_https_urls"; + + /** * Which User-Agent string to use in the header of the captive portal detection probes. * The User-Agent field is unset when this setting has no value (HttpUrlConnection default). */ @@ -112,6 +124,17 @@ public class NetworkStackUtils { public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; /** + * The default list of HTTP URLs to use for detecting captive portals. + */ + public static final String[] DEFAULT_CAPTIVE_PORTAL_HTTP_URLS = + new String [] {"http://connectivitycheck.gstatic.com/generate_204"}; + /** + * The default list of HTTPS URLs for network validation, to use for confirming internet + * connectivity. + */ + public static final String[] DEFAULT_CAPTIVE_PORTAL_HTTPS_URLS = + new String [] {"https://www.google.com/generate_204"}; + /** * @deprecated Considering boolean experiment flag is likely to cause misconfiguration * particularly when NetworkStack module rolls back to previous version. It's * much safer to determine whether or not to enable one specific experimental |