From c825db1194ad9eab6bfa29619cabc3cc0641305a Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Mon, 15 Jul 2019 18:11:16 -0700 Subject: [PATCH] Do not set AccessPoint.ssid to config.SSID for Passpoint networks On each WifiTracker scan, existing Passpoint AccessPoints are updated by update(config) with a WifiConfiguration returned by the framework and then updated with fresh scan results through setScanResults(). Since the Passpoint WifiConfigurations given to update(config) have null SSID, the call to setScanResults() sets the config.SSID to the SSID of the strongest scan result. However, update(config) also sets AccessPoint.ssid to config.SSID, which means the UI may display a blank SSID before the call to setScanResults() sets it to the correct SSID. Thus, update(config) should not set AccessPoint.ssid to config.SSID if the AccessPoint is for Passpoint. Bug: 137282522 Test: manual - connect to Passpoint network, validate SSID in network details page. Change-Id: I2218c1217de3e4fe48e40114a3ea8ceab3d845f2 --- .../src/com/android/settingslib/wifi/AccessPoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index f16fb1c91b7ca..6b1ceae4bed86 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -1435,7 +1435,7 @@ public class AccessPoint implements Comparable { void update(@Nullable WifiConfiguration config) { mConfig = config; - if (mConfig != null) { + if (mConfig != null && !isPasspoint()) { ssid = removeDoubleQuotes(mConfig.SSID); } networkId = config != null ? config.networkId : WifiConfiguration.INVALID_NETWORK_ID;