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

Commit 9d4e4557 authored by Paul Zhang's avatar Paul Zhang Committed by Steve Kondik
Browse files

Wifi: Fix 2 ip addresses issue

Invoking the function clearInterfaceAddresses to clear
the initial IP first when change the "IP Settings"
for the select AP.

Change-Id: I38f6614e66cc3cf8d84e03c19d2d4badb1b16108
CRs-Fixed: 683307
parent 8607c1b2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3772,6 +3772,12 @@ public class WifiStateMachine extends StateMachine {
                    NetworkUpdateResult result = mWifiConfigStore.saveNetwork(config);
                    if (mWifiInfo.getNetworkId() == result.getNetworkId()) {
                        if (result.hasIpChanged()) {
                            try {
                                log("clear IP address on connection");
                                mNwService.clearInterfaceAddresses(mInterfaceName);
                            } catch (Exception e) {
                                loge("Failed to clear addresses" + e);
                            }
                            log("Reconfiguring IP on connection");
                            transitionTo(mObtainingIpState);
                        }