diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-02-14 09:26:07 -0800 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-02-29 19:32:40 -0800 |
commit | 09a9b38fbccd4c6e62f042d8bb326f9b6ef9a8f0 (patch) | |
tree | d260ea10311e804dbe205d44927c1483d5379d92 /src | |
parent | 49cd8d54815a3b820d135dc310df1d60de1e6a8c (diff) | |
download | packages_apps_settings-09a9b38fbccd4c6e62f042d8bb326f9b6ef9a8f0.zip packages_apps_settings-09a9b38fbccd4c6e62f042d8bb326f9b6ef9a8f0.tar.gz packages_apps_settings-09a9b38fbccd4c6e62f042d8bb326f9b6ef9a8f0.tar.bz2 |
Add support for wifi verification before connect
Change-Id: Ie1fb9c2fad4f75985077236eab61c296314f4fe4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/wifi/AdvancedWifiSettings.java | 7 | ||||
-rw-r--r-- | src/com/android/settings/wifi/WifiSettings.java | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/settings/wifi/AdvancedWifiSettings.java b/src/com/android/settings/wifi/AdvancedWifiSettings.java index c213512..5d673c4 100644 --- a/src/com/android/settings/wifi/AdvancedWifiSettings.java +++ b/src/com/android/settings/wifi/AdvancedWifiSettings.java @@ -77,10 +77,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment (CheckBoxPreference) findPreference(KEY_ENABLE_WIFI_WATCHDOG); if (watchdogEnabled != null) { watchdogEnabled.setChecked(Secure.getInt(getContentResolver(), - Secure.WIFI_WATCHDOG_ON, 1) == 1); - - //TODO: Bring this back after changing watchdog behavior - getPreferenceScreen().removePreference(watchdogEnabled); + Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, 1) == 1); } ListPreference frequencyPref = (ListPreference) findPreference(KEY_FREQUENCY_BAND); @@ -145,7 +142,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment ((CheckBoxPreference) preference).isChecked() ? 1 : 0); } else if (KEY_ENABLE_WIFI_WATCHDOG.equals(key)) { Secure.putInt(getContentResolver(), - Secure.WIFI_WATCHDOG_ON, + Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, ((CheckBoxPreference) preference).isChecked() ? 1 : 0); } else { return super.onPreferenceTreeClick(screen, preference); diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java index 22ba3bd..cf53ac5 100644 --- a/src/com/android/settings/wifi/WifiSettings.java +++ b/src/com/android/settings/wifi/WifiSettings.java @@ -565,9 +565,10 @@ public class WifiSettings extends SettingsPreferenceFragment //network state change events so the apps dont have to worry about //ignoring supplicant state change when network is connected //to get more fine grained information. - if (!mConnected.get()) { - updateConnectionState(WifiInfo.getDetailedStateOf((SupplicantState) - intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE))); + SupplicantState state = (SupplicantState) intent.getParcelableExtra( + WifiManager.EXTRA_NEW_STATE); + if (!mConnected.get() && SupplicantState.isHandshakeState(state)) { + updateConnectionState(WifiInfo.getDetailedStateOf(state)); } if (mInXlSetupWizard) { |