summaryrefslogtreecommitdiff
path: root/src/android/net/util/NetworkStackUtils.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-05-01 00:52:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-01 00:52:20 +0000
commitc370cb0a230d75c24b378426e9762891b5a66c81 (patch)
treee16279851d4dc19ca3f18ab5d7039f447884e14e /src/android/net/util/NetworkStackUtils.java
parentdf1fcffeb6eb6db78a07edaaf1f8c3b60ac50d0f (diff)
parent9d5175317630e14c2f76de6d6f273609a46a4b76 (diff)
Merge "Add test configuration values for probe URLs" into rvc-dev am: 9d51753176
Change-Id: Ie66ca15fcd73f83ba3336d51f3ec8700ebaf59ac
Diffstat (limited to 'src/android/net/util/NetworkStackUtils.java')
-rwxr-xr-xsrc/android/net/util/NetworkStackUtils.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java
index 6fd6043..be4c2e4 100755
--- a/src/android/net/util/NetworkStackUtils.java
+++ b/src/android/net/util/NetworkStackUtils.java
@@ -93,6 +93,37 @@ public class NetworkStackUtils {
public static final String CAPTIVE_PORTAL_HTTP_URL = "captive_portal_http_url";
/**
+ * A test URL used to override configuration settings and overlays for the network validation
+ * HTTPS URL, when set in {@link android.provider.DeviceConfig} configuration.
+ *
+ * <p>This URL will be ignored if the host is not "localhost" (it can only be used to test with
+ * a local test server), and must not be set in production scenarios (as enforced by CTS tests).
+ *
+ * <p>{@link #TEST_URL_EXPIRATION_TIME} must also be set to use this setting.
+ */
+ public static final String TEST_CAPTIVE_PORTAL_HTTPS_URL = "test_captive_portal_https_url";
+
+ /**
+ * A test URL used to override configuration settings and overlays for the network validation
+ * HTTP URL, when set in {@link android.provider.DeviceConfig} configuration.
+ *
+ * <p>This URL will be ignored if the host is not "localhost" (it can only be used to test with
+ * a local test server), and must not be set in production scenarios (as enforced by CTS tests).
+ *
+ * <p>{@link #TEST_URL_EXPIRATION_TIME} must also be set to use this setting.
+ */
+ public static final String TEST_CAPTIVE_PORTAL_HTTP_URL = "test_captive_portal_http_url";
+
+ /**
+ * Expiration time of the test URL, in ms, relative to {@link System#currentTimeMillis()}.
+ *
+ * <p>After this expiration time, test URLs will be ignored. They will also be ignored if
+ * the expiration time is more than 10 minutes in the future, to avoid misconfiguration
+ * following test runs.
+ */
+ public static final String TEST_URL_EXPIRATION_TIME = "test_url_expiration_time";
+
+ /**
* The URL used for fallback HTTP captive portal detection when previous HTTP
* and HTTPS captive portal detection attemps did not return a conclusive answer.
*/