Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c8de733 authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE update current config with dhcp settings" into honeycomb-mr1

parents e70c6607 84cffa45
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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
     */
+1 −0
Original line number Diff line number Diff line
@@ -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: " +