OSDN Git Service

Wi-Fi: Do not display the not scanned saved networks forever
authorNalla Kartheek <karthe@codeaurora.org>
Fri, 20 Nov 2015 08:02:41 +0000 (13:32 +0530)
committerSteve Kondik <steve@cyngn.com>
Fri, 1 Jul 2016 12:03:24 +0000 (05:03 -0700)
A flag is introduced to signify it these saved profiles were scanned or
not and this commit shall ensure that such entries are displayed only
when the flag indicates to have scanned.

Change-Id: I0c525a493caa39c3bed5149898160dd4662dd0c8
CRs-Fixed: 940917

src/com/android/settings/wifi/WifiSettings.java

index e83889c..5fc70e5 100644 (file)
@@ -666,6 +666,10 @@ public class WifiSettings extends RestrictedSettingsFragment
                 for (AccessPoint accessPoint : accessPoints) {
                     // Ignore access points that are out of range.
                     if (accessPoint.getLevel() != -1) {
+                        if (accessPoint.isSaved() && (!accessPoint.foundInScanResult)
+                               && (accessPoint.getDetailedState() == null)) {
+                            continue;
+                        }
                         hasAvailableAccessPoints = true;
                         if (accessPoint.getTag() != null) {
                             final Preference pref = (Preference) accessPoint.getTag();