summaryrefslogtreecommitdiffstats
path: root/core/java/android/provider/Settings.java
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-06-05 21:29:56 -0700
committerIrfan Sheriff <isheriff@google.com>2011-06-07 15:10:58 -0700
commit5ea65d609f0c8e1e3a1dcd192c4058aa2ccf3212 (patch)
tree3ade7c456a6e3a323d9dc30d7ac88ca17482b95a /core/java/android/provider/Settings.java
parent40f4efe712b375cf0421f4651abbc703595d9d47 (diff)
downloadframeworks_base-5ea65d609f0c8e1e3a1dcd192c4058aa2ccf3212.zip
frameworks_base-5ea65d609f0c8e1e3a1dcd192c4058aa2ccf3212.tar.gz
frameworks_base-5ea65d609f0c8e1e3a1dcd192c4058aa2ccf3212.tar.bz2
Update walled garden detection logic
DNS based techniques dont always work. Some hotspots redirect on data fetch on IP. Use a known pattern match on URL to detect a walled garden instead. Also, added gservices capability to turn off the feature or change the URL & the pattern to match Bug: 4378442 Change-Id: I78b4208d3ea3ace20069169e7c01ed769892d94d
Diffstat (limited to 'core/java/android/provider/Settings.java')
-rw-r--r--core/java/android/provider/Settings.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 893947d..2126793 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2924,6 +2924,30 @@ public final class Settings {
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
/**
+ * Setting to turn off walled garden test on Wi-Fi. Feature is enabled by default and
+ * the setting needs to be set to 0 to disable it.
+ * @hide
+ */
+ public static final String WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED =
+ "wifi_watchdog_walled_garden_test_enabled";
+
+ /**
+ * The URL used for walled garden check upon a new conection. WifiWatchdogService
+ * fetches the URL and checks to see if {@link #WIFI_WATCHDOG_WALLED_GARDEN_PATTERN}
+ * is not part of the title string to notify the user on the presence of a walled garden.
+ * @hide
+ */
+ public static final String WIFI_WATCHDOG_WALLED_GARDEN_URL =
+ "wifi_watchdog_walled_garden_url";
+
+ /**
+ * The pattern string in the fetched URL used to detect a walled garden
+ * @hide
+ */
+ public static final String WIFI_WATCHDOG_WALLED_GARDEN_PATTERN =
+ "wifi_watchdog_walled_garden_pattern";
+
+ /**
* The maximum number of times we will retry a connection to an access
* point for which we have failed in acquiring an IP address from DHCP.
* A value of N means that we will make N+1 connection attempts in all.