summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-09-09 12:36:28 -0700
committerIrfan Sheriff <isheriff@google.com>2011-09-09 12:36:28 -0700
commit998196d64d35c1767dbb08f059fe3af171e44e1d (patch)
treeace37554a7a4a2e298ea9eaf259499eb18715afa /wifi
parent76866208f81988fa653568513112b152e156d806 (diff)
downloadframeworks_base-998196d64d35c1767dbb08f059fe3af171e44e1d.zip
frameworks_base-998196d64d35c1767dbb08f059fe3af171e44e1d.tar.gz
frameworks_base-998196d64d35c1767dbb08f059fe3af171e44e1d.tar.bz2
Finalize wifi watchdog default settings
- Reduce DNS counts from 15 to 5. 15 was for debug. - Keep success scenario as atleast 1 being successful - Wait for a second to start checks (for some setups) - Use one bar as a start for doing periodic DNS checks - Do a DNS check every hour (instead of half hour) Bug: 5284337 Change-Id: Ie64d8cac48318a0c4c59f91ad21f8c6712b71338
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiWatchdogStateMachine.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
index c52142d..fe0e850 100644
--- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
@@ -77,15 +77,15 @@ public class WifiWatchdogStateMachine extends StateMachine {
/**
* Low signal is defined as less than or equal to cut off
*/
- private static final int LOW_SIGNAL_CUTOFF = 1;
+ private static final int LOW_SIGNAL_CUTOFF = 0;
private static final long DEFAULT_DNS_CHECK_SHORT_INTERVAL_MS = 2 * 60 * 1000;
- private static final long DEFAULT_DNS_CHECK_LONG_INTERVAL_MS = 30 * 60 * 1000;
+ private static final long DEFAULT_DNS_CHECK_LONG_INTERVAL_MS = 60 * 60 * 1000;
private static final long DEFAULT_WALLED_GARDEN_INTERVAL_MS = 30 * 60 * 1000;
private static final int DEFAULT_MAX_SSID_BLACKLISTS = 7;
- private static final int DEFAULT_NUM_DNS_PINGS = 15; // Multiple pings to detect setup issues
- private static final int DEFAULT_MIN_DNS_RESPONSES = 3;
+ private static final int DEFAULT_NUM_DNS_PINGS = 5; // Multiple pings to detect setup issues
+ private static final int DEFAULT_MIN_DNS_RESPONSES = 1;
private static final int DEFAULT_DNS_PING_TIMEOUT_MS = 2000;
@@ -95,7 +95,9 @@ public class WifiWatchdogStateMachine extends StateMachine {
private static final String DEFAULT_WALLED_GARDEN_URL =
"http://clients3.google.com/generate_204";
private static final int WALLED_GARDEN_SOCKET_TIMEOUT_MS = 10000;
- private static final int DNS_INTRATEST_PING_INTERVAL = 200; // Long delay to detect setup issues
+ private static final int DNS_INTRATEST_PING_INTERVAL_MS = 200;
+ /* With some router setups, it takes a few hunder milli-seconds before connection is active */
+ private static final int DNS_START_DELAY_MS = 1000;
private static final int BASE = Protocol.BASE_WIFI_WATCHDOG;
@@ -677,7 +679,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
for (int i=0; i < mNumDnsPings; i++) {
for (int j = 0; j < numDnses; j++) {
idDnsMap.put(mDnsPinger.pingDnsAsync(mDnsList.get(j), mDnsPingTimeoutMs,
- DNS_INTRATEST_PING_INTERVAL * i), j);
+ DNS_START_DELAY_MS + DNS_INTRATEST_PING_INTERVAL_MS * i), j);
}
}
}