diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-09-09 15:15:13 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-09 15:15:13 -0700 |
commit | 858c396e877d04843af6db663218b3992c8fee64 (patch) | |
tree | e18680784ccdd2657a8f2867043c89feb5cded25 /wifi/java | |
parent | dd4c7714bb0d73532320c276632f61cf5a0974bf (diff) | |
parent | 998196d64d35c1767dbb08f059fe3af171e44e1d (diff) | |
download | frameworks_base-858c396e877d04843af6db663218b3992c8fee64.zip frameworks_base-858c396e877d04843af6db663218b3992c8fee64.tar.gz frameworks_base-858c396e877d04843af6db663218b3992c8fee64.tar.bz2 |
Merge "Finalize wifi watchdog default settings"
Diffstat (limited to 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/WifiWatchdogStateMachine.java | 14 |
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); } } } |