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

am: 33840ce005

Change-Id: I9a0588a9f311049b94d286cad83b4155ce94532c
This commit is contained in:
Eric Schwarzenbach
2017-08-10 02:19:36 +00:00
committed by android-build-merger

View File

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