diff options
author | Mike Lockwood <lockwood@google.com> | 2012-02-13 13:37:23 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-16 10:01:44 -0800 |
commit | 79f5a0416fe76d5063b4d9995edd84a49b77995e (patch) | |
tree | 2ab1a7c632b114481274f44bb795a15d00c704fc /wifi/java | |
parent | 16b7ddcfe64acf6715ba4b6e012c3d12d15d0380 (diff) | |
download | frameworks_base-79f5a0416fe76d5063b4d9995edd84a49b77995e.zip frameworks_base-79f5a0416fe76d5063b4d9995edd84a49b77995e.tar.gz frameworks_base-79f5a0416fe76d5063b4d9995edd84a49b77995e.tar.bz2 |
WifiStateTracker: add support for overriding DCHP max retry count in an overlay
Bug: 5551068
Signed-off-by: Mike Lockwood <lockwood@google.com>
Conflicts:
packages/SettingsProvider/res/values/defaults.xml
Change-Id: I6a6519316a87bd1af39ea9dc51e0d312011135ef
Diffstat (limited to 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 0134456..1b64f3e 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -1754,7 +1754,9 @@ public class WifiStateMachine extends StateMachine { * If we've exceeded the maximum number of retries for DHCP * to a given network, disable the network */ - if (++mReconnectCount > getMaxDhcpRetries()) { + int maxRetries = getMaxDhcpRetries(); + // maxRetries == 0 means keep trying forever + if (maxRetries > 0 && ++mReconnectCount > maxRetries) { loge("Failed " + mReconnectCount + " times, Disabling " + mLastNetworkId); mWifiConfigStore.disableNetwork(mLastNetworkId, |