diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-03-03 12:14:28 -0800 |
---|---|---|
committer | Irfan SHeriff <isheriff@google.com> | 2011-03-03 15:00:51 -0800 |
commit | 84cffa45261519a96949ec5c6cd8e21fea950ff5 (patch) | |
tree | 22c684a7323951109ba58ef69b172d2c33199842 /wifi/java/android | |
parent | 6c8d76527c938eb49182a6fd0677ccbc1618e7a8 (diff) | |
download | frameworks_base-84cffa45261519a96949ec5c6cd8e21fea950ff5.zip frameworks_base-84cffa45261519a96949ec5c6cd8e21fea950ff5.tar.gz frameworks_base-84cffa45261519a96949ec5c6cd8e21fea950ff5.tar.bz2 |
DO NOT MERGE update current config with dhcp settings
After DHCP completes, update the current configured
networks list with the IP setting details
Change-Id: I1ece1eda20224c69a4635bd38fdc5bef15818bb2
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfigStore.java | 19 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java index f6317f5..e6decc8 100644 --- a/wifi/java/android/net/wifi/WifiConfigStore.java +++ b/wifi/java/android/net/wifi/WifiConfigStore.java @@ -461,6 +461,25 @@ class WifiConfigStore { } /** + * set IP configuration for a given network id + */ + static void setIpConfiguration(int netId, DhcpInfoInternal dhcpInfo) { + LinkProperties linkProperties = dhcpInfo.makeLinkProperties(); + + synchronized (sConfiguredNetworks) { + WifiConfiguration config = sConfiguredNetworks.get(netId); + if (config != null) { + // add old proxy details + if(config.linkProperties != null) { + linkProperties.setHttpProxy(config.linkProperties.getHttpProxy()); + } + config.linkProperties = linkProperties; + } + } + } + + + /** * Fetch the proxy properties for a given network id */ static ProxyProperties getProxyProperties(int netId) { diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 589d88c..717dcf0 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -2510,6 +2510,7 @@ public class WifiStateMachine extends HierarchicalStateMachine { synchronized (mDhcpInfoInternal) { mDhcpInfoInternal = dhcpInfoInternal; } + WifiConfigStore.setIpConfiguration(mLastNetworkId, dhcpInfoInternal); sendMessage(CMD_IP_CONFIG_SUCCESS); } else { Log.d(TAG, "DHCP request failed: " + |