summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib
diff options
context:
space:
mode:
authorNalla Kartheek <karthe@codeaurora.org>2015-11-20 13:19:54 +0530
committerSteve Kondik <steve@cyngn.com>2016-01-23 23:28:16 -0800
commit20b61d1f97f2ee4201a0288578047068f55fad70 (patch)
tree4e11aeb19db27cb02a5e3cf5a627a77e000bee74 /packages/SettingsLib
parent3db159dbd2b42bfd2896106b9ab7d97c472742e0 (diff)
downloadframeworks_base-20b61d1f97f2ee4201a0288578047068f55fad70.zip
frameworks_base-20b61d1f97f2ee4201a0288578047068f55fad70.tar.gz
frameworks_base-20b61d1f97f2ee4201a0288578047068f55fad70.tar.bz2
Introduce a flag to signify the presence of saved profile in scan results
This flag shall signify that the saved profile is seen in the scan results and based on this such entries are displayed as found, without which, the scan results ended up showing these saved profiles forever, though the profile is not scanned. Change-Id: I0c953b5e86a547bd108cf0a8b553e62b2c31fa4e CRs-Fixed: 940917
Diffstat (limited to 'packages/SettingsLib')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java2
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index fca6318..f8bcc27 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -124,6 +124,8 @@ public class AccessPoint implements Comparable<AccessPoint> {
private Object mTag;
+ public boolean foundInScanResult = false;
+
public AccessPoint(Context context, Bundle savedState) {
mContext = context;
mConfig = savedState.getParcelable(KEY_CONFIG);
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index 4f51137..ed0371c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -319,7 +319,8 @@ public class WifiTracker {
if (config.selfAdded && config.numAssociation == 0) {
continue;
}
- AccessPoint accessPoint = new AccessPoint(mContext, config);
+ AccessPoint accessPoint = getCachedOrCreate(config, cachedAccessPoints);
+ accessPoint.foundInScanResult = false;
if (mLastInfo != null && mLastNetworkInfo != null) {
if (config.isPasspoint() == false) {
accessPoint.update(connectionConfig, mLastInfo, mLastNetworkInfo);
@@ -352,6 +353,7 @@ public class WifiTracker {
boolean found = false;
for (AccessPoint accessPoint : apMap.getAll(result.SSID)) {
if (accessPoint.update(result)) {
+ accessPoint.foundInScanResult = true;
found = true;
break;
}