Merge "update current config with dhcp settings"
This commit is contained in:
committed by
Android (Google) Code Review
commit
c0bf067f1c
@@ -460,6 +460,25 @@ class WifiConfigStore {
|
||||
return dhcpInfoInternal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -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: " +
|
||||
|
||||
Reference in New Issue
Block a user