Add support for wifi verification before connect
Change-Id: Ie1fb9c2fad4f75985077236eab61c296314f4fe4
This commit is contained in:
@@ -237,6 +237,10 @@
|
||||
<item>Disconnected</item>
|
||||
<!-- Status message of Wi-Fi when it is a failure. -->
|
||||
<item>Unsuccessful</item>
|
||||
<!-- Status message of Wi-Fi when it is blocked. -->
|
||||
<item>Blocked</item>
|
||||
<!-- Status message of Wi-Fi when connectiong is being verified. -->
|
||||
<item>Temporarily avoiding poor connection</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Match this with the order of NetworkInfo.DetailedState. --> <skip />
|
||||
@@ -262,6 +266,10 @@
|
||||
<item>Disconnected</item>
|
||||
<!-- Status message of Wi-Fi when it is a failure. -->
|
||||
<item>Unsuccessful</item>
|
||||
<!-- Status message of Wi-Fi when it is blocked. -->
|
||||
<item>Blocked</item>
|
||||
<!-- Status message of Wi-Fi when connectiong is being verified. -->
|
||||
<item>Temporarily avoiding poor connection</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Match this with the constants in AccessPoint. --> <skip />
|
||||
|
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user