summaryrefslogtreecommitdiff
path: root/src/android/net/util/NetworkStackUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rw-r--r--src/android/net/util/NetworkStackUtils.java23
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