Merge change 26328 into eclair
* changes: Fix the issue of 'Wifi framework is not aware of state change'
This commit is contained in:
@@ -907,6 +907,7 @@ public class WifiStateTracker extends NetworkStateTracker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (newState == SupplicantState.DISCONNECTED) {
|
} else if (newState == SupplicantState.DISCONNECTED) {
|
||||||
|
mHaveIpAddress = false;
|
||||||
if (isDriverStopped() || mDisconnectExpected) {
|
if (isDriverStopped() || mDisconnectExpected) {
|
||||||
handleDisconnectedState(DetailedState.DISCONNECTED);
|
handleDisconnectedState(DetailedState.DISCONNECTED);
|
||||||
} else {
|
} else {
|
||||||
@@ -1007,20 +1008,17 @@ public class WifiStateTracker extends NetworkStateTracker {
|
|||||||
setNotificationVisible(false, 0, false, 0);
|
setNotificationVisible(false, 0, false, 0);
|
||||||
boolean wasDisconnectPending = mDisconnectPending;
|
boolean wasDisconnectPending = mDisconnectPending;
|
||||||
cancelDisconnect();
|
cancelDisconnect();
|
||||||
if (!TextUtils.equals(mWifiInfo.getSSID(), mLastSsid)) {
|
/*
|
||||||
/*
|
* The connection is fully configured as far as link-level
|
||||||
* The connection is fully configured as far as link-level
|
* connectivity is concerned, but we may still need to obtain
|
||||||
* connectivity is concerned, but we may still need to obtain
|
* an IP address.
|
||||||
* an IP address. But do this only if we are connecting to
|
*/
|
||||||
* a different network than we were connected to previously.
|
if (wasDisconnectPending) {
|
||||||
*/
|
DetailedState saveState = getNetworkInfo().getDetailedState();
|
||||||
if (wasDisconnectPending) {
|
handleDisconnectedState(DetailedState.DISCONNECTED);
|
||||||
DetailedState saveState = getNetworkInfo().getDetailedState();
|
setDetailedStateInternal(saveState);
|
||||||
handleDisconnectedState(DetailedState.DISCONNECTED);
|
|
||||||
setDetailedStateInternal(saveState);
|
|
||||||
}
|
|
||||||
configureInterface();
|
|
||||||
}
|
}
|
||||||
|
configureInterface();
|
||||||
mLastBssid = result.BSSID;
|
mLastBssid = result.BSSID;
|
||||||
mLastSsid = mWifiInfo.getSSID();
|
mLastSsid = mWifiInfo.getSSID();
|
||||||
mLastNetworkId = result.networkId;
|
mLastNetworkId = result.networkId;
|
||||||
|
|||||||
Reference in New Issue
Block a user