From f99d52cf7156991a74f942efb081369a5a14a431 Mon Sep 17 00:00:00 2001 From: sunil duttu Date: Wed, 6 Feb 2013 11:12:03 +0530 Subject: [PATCH] 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 --- src/com/android/settings/wifi/WifiSettings.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java index aedb79e536b..dea1618fa81 100644 --- a/src/com/android/settings/wifi/WifiSettings.java +++ b/src/com/android/settings/wifi/WifiSettings.java @@ -835,7 +835,12 @@ 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( WifiManager.EXTRA_NETWORK_INFO);