onConnectedChanged should not update access points

In WifiSettings, invocation of onConnectedChanged should not update
access points. This is controller by another callback,
onAccessPointsChanged. Furthermore, this is fired before any changes
have even been made to the AccessPoints.

This is exacerbating a problem where old scan results are not shown in
the WifiPicker, or sometimes the platform does not return any scan
results.

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Ibbc067d9952525b4edd85389996509e9b17bb1bd
This commit is contained in:
Sundeep Ghuman
2017-07-21 15:20:21 -07:00
parent 0724a106fe
commit 45bb3a1a77
2 changed files with 21 additions and 3 deletions

View File

@@ -734,12 +734,10 @@ public class WifiSettings extends RestrictedSettingsFragment
}
/**
* Called when the connection state of wifi has changed and isConnected
* should be called to get the updated state.
* Called when the connection state of wifi has changed.
*/
@Override
public void onConnectedChanged() {
updateAccessPointsDelayed();
changeNextButtonState(mWifiTracker.isConnected());
}