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

Commit 2e2f6b5e authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 26328 into eclair

* changes:
  Fix the issue of 'Wifi framework is not aware of state change'
parents 9cea89c1 7121ac56
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -907,6 +907,7 @@ public class WifiStateTracker extends NetworkStateTracker {
                            }
                        }
                    } else if (newState == SupplicantState.DISCONNECTED) {
                        mHaveIpAddress = false;
                        if (isDriverStopped() || mDisconnectExpected) {
                            handleDisconnectedState(DetailedState.DISCONNECTED);
                        } else {
@@ -1007,12 +1008,10 @@ public class WifiStateTracker extends NetworkStateTracker {
                    setNotificationVisible(false, 0, false, 0);
                    boolean wasDisconnectPending = mDisconnectPending;
                    cancelDisconnect();
                    if (!TextUtils.equals(mWifiInfo.getSSID(), mLastSsid)) {
                    /*
                     * The connection is fully configured as far as link-level
                     * connectivity is concerned, but we may still need to obtain
                         * an IP address. But do this only if we are connecting to
                         * a different network than we were connected to previously.
                     * an IP address.
                     */
                    if (wasDisconnectPending) {
                        DetailedState saveState = getNetworkInfo().getDetailedState();
@@ -1020,7 +1019,6 @@ public class WifiStateTracker extends NetworkStateTracker {
                        setDetailedStateInternal(saveState);
                    }
                    configureInterface();
                    }
                    mLastBssid = result.BSSID;
                    mLastSsid = mWifiInfo.getSSID();
                    mLastNetworkId = result.networkId;