summaryrefslogtreecommitdiff
path: root/src/android/net/util/NetworkStackUtils.java
diff options
context:
space:
mode:
authorChiachang Wang <chiachangwang@google.com>2019-04-24 22:05:10 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-04-24 22:05:10 -0700
commitfac885b2175342563bf815f0f853a38cbd12e36b (patch)
tree28b0ac530c9ddb59a0592a7500fc31fca75c1db3 /src/android/net/util/NetworkStackUtils.java
parentcd62a7fbdb1609edecdd8d6b5c8c9a2f4ec065d2 (diff)
parente64317d08784679031b2d62ba827e49468cffbe3 (diff)
Merge "Remove Settings constants for NetworkStack"
am: d32d766a04 Change-Id: Icba412d89c10a64d7e5d3d396b6a1364f7ad6bc5
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rw-r--r--src/android/net/util/NetworkStackUtils.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java
index fb03c54..abfed3e 100644
--- a/src/android/net/util/NetworkStackUtils.java
+++ b/src/android/net/util/NetworkStackUtils.java
@@ -62,6 +62,49 @@ public class NetworkStackUtils {
*/
public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https";
+ /**
+ * The URL used for HTTPS captive portal detection upon a new connection.
+ * A 204 response code from the server is used for validation.
+ */
+ public static final String CAPTIVE_PORTAL_HTTPS_URL = "captive_portal_https_url";
+
+ /**
+ * The URL used for HTTP captive portal detection upon a new connection.
+ * A 204 response code from the server is used for validation.
+ */
+ public static final String CAPTIVE_PORTAL_HTTP_URL = "captive_portal_http_url";
+
+ /**
+ * The URL used for fallback HTTP captive portal detection when previous HTTP
+ * and HTTPS captive portal detection attemps did not return a conclusive answer.
+ */
+ public static final String CAPTIVE_PORTAL_FALLBACK_URL = "captive_portal_fallback_url";
+
+ /**
+ * What to do when connecting a network that presents a captive portal.
+ * Must be one of the CAPTIVE_PORTAL_MODE_* constants above.
+ *
+ * The default for this setting is CAPTIVE_PORTAL_MODE_PROMPT.
+ */
+ public static final String CAPTIVE_PORTAL_MODE = "captive_portal_mode";
+
+ /**
+ * Don't attempt to detect captive portals.
+ */
+ public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0;
+
+ /**
+ * When detecting a captive portal, display a notification that
+ * prompts the user to sign in.
+ */
+ public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1;
+
+ /**
+ * When detecting a captive portal, immediately disconnect from the
+ * network and do not reconnect to that network in the future.
+ */
+ public static final int CAPTIVE_PORTAL_MODE_AVOID = 2;
+
static {
System.loadLibrary("networkstackutilsjni");
}