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

Commit dd65ed25 authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 92593dc4: am 84db79bb: Merge "Clear IP configuration on lost network" into honeycomb-LTE

* commit '92593dc4':
  Clear IP configuration on lost network
parents e6510eb9 92593dc4
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -478,6 +478,21 @@ class WifiConfigStore {
        }
    }

    /**
     * clear IP configuration for a given network id
     */
    static void clearIpConfiguration(int netId) {
        synchronized (sConfiguredNetworks) {
            WifiConfiguration config = sConfiguredNetworks.get(netId);
            if (config != null && config.linkProperties != null) {
                // Clear everything except proxy
                ProxyProperties proxy = config.linkProperties.getHttpProxy();
                config.linkProperties.clear();
                config.linkProperties.setHttpProxy(proxy);
            }
        }
    }


    /**
     * Fetch the proxy properties for a given network id
+4 −1
Original line number Diff line number Diff line
@@ -1456,10 +1456,13 @@ public class WifiStateMachine extends StateMachine {

        /* Clear network properties */
        mLinkProperties.clear();
        /* Clear IP settings if the network used DHCP */
        if (!WifiConfigStore.isUsingStaticIp(mLastNetworkId)) {
            WifiConfigStore.clearIpConfiguration(mLastNetworkId);
        }

        mLastBssid= null;
        mLastNetworkId = WifiConfiguration.INVALID_NETWORK_ID;

    }

    void handlePreDhcpSetup() {