Merge "Fix issue where connected network sometimes doesn't update." into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-08-09 19:49:41 +00:00
committed by Android (Google) Code Review

View File

@@ -857,10 +857,11 @@ public class WifiSettings extends RestrictedSettingsFragment
}
// Is the previous currently connected SSID different from the new one?
if (!((AccessPointPreference)
mConnectedAccessPointPreferenceCategory.getPreference(0))
.getAccessPoint().getSsidStr().equals(
connectedAp.getSsidStr())) {
AccessPointPreference preference = (AccessPointPreference)
(mConnectedAccessPointPreferenceCategory.getPreference(0));
// The AccessPoints need to be the same reference to ensure that updates are reflected
// in the UI.
if (preference.getAccessPoint() != connectedAp) {
removeConnectedAccessPointPreference();
addConnectedAccessPointPreference(connectedAp);
return true;