wifiSettings: Updating the networkinfo on supplicant event

In framework we update the networkId on supplicant state change
these changes in the network info should be reflected in settings.
there by updating the networkinfo.
The problem we are facing without this fix is when we have single
saved AP profile Switching off the AP when we are in connecting
tate resulting in a behavior Where UI keep showing connecting
to that AP instead of showing it as out of range.

Change-Id: I04073b9a4068f4b75216ebfd431adc126583f15c
This commit is contained in:
sunil duttu
2013-02-06 11:12:03 +05:30
parent 505232be07
commit f99d52cf71

View File

@@ -835,6 +835,11 @@ public class WifiSettings extends SettingsPreferenceFragment
WifiManager.EXTRA_NEW_STATE);
if (!mConnected.get() && SupplicantState.isHandshakeState(state)) {
updateConnectionState(WifiInfo.getDetailedStateOf(state));
} else {
// During a connect, we may have the supplicant
// state change affect the detailed network state.
// Make sure a lost connection is updated as well.
updateConnectionState(null);
}
} else if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) {
NetworkInfo info = (NetworkInfo) intent.getParcelableExtra(