summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorc_rrajiv <rrajiv@codeaurora.org>2016-01-05 12:52:20 +0530
committerSteve Kondik <steve@cyngn.com>2016-06-24 11:28:49 -1000
commitcbe286e03ebf995b90f5f7323f50b30747294de8 (patch)
tree51f828954c5c7dac439dfa90afe0ef9c9083528f /service
parente97c943330f18567161184d1a65842442a79983e (diff)
downloadframeworks_opt_net_wifi-cbe286e03ebf995b90f5f7323f50b30747294de8.tar.gz
frameworks_opt_net_wifi-cbe286e03ebf995b90f5f7323f50b30747294de8.tar.bz2
frameworks_opt_net_wifi-cbe286e03ebf995b90f5f7323f50b30747294de8.zip
wificonfig: store the scan cache for saved wifi configuration
Each saved profile has an entry in networkHistory.txt file placed at /data/misc/wifi location whose information is later used to autojoin when wifi is turned on. The logic to read this file skips the logic to store the scan details of that particular wifi configuration.Hence the parsing logic is modified to store the scan cache for each saved wifi configuration. CRs-Fixed: 958484 Change-Id: I6627cda3810b56b766664992676cdf1441c77fe9
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigStore.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index 46250b3..ec635f2 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -2438,6 +2438,8 @@ public class WifiConfigStore extends IpConfigStore {
String bssid = null;
String ssid = null;
+ String key = null;
+ String value = null;
int freq = 0;
int status = 0;
@@ -2452,12 +2454,16 @@ public class WifiConfigStore extends IpConfigStore {
break;
}
int colon = line.indexOf(':');
- if (colon < 0) {
+ char slash = line.charAt(0);
+ if ((colon < 0)&& (slash != '/')) {
continue;
}
-
- String key = line.substring(0, colon).trim();
- String value = line.substring(colon + 1).trim();
+ if (slash == '/') {
+ key = line.trim();
+ } else {
+ key = line.substring(0, colon).trim();
+ value = line.substring(colon + 1).trim();
+ }
if (key.equals(CONFIG_KEY)) {
@@ -2603,8 +2609,15 @@ public class WifiConfigStore extends IpConfigStore {
break;
case BSSID_KEY:
status = 0;
- ssid = null;
- bssid = null;
+ /*
+ * The intention here is to put the scanDetail in to
+ * the scanDetailCache per config , as done in
+ * BSSID_KEY_END . Thus store bssid value and
+ * comment ssid = null to ensure the code in the if
+ * loop is executed for the case BSSID_KEY_END.
+ */
+ // ssid = null;
+ bssid = value;
freq = 0;
seen = 0;
rssi = WifiConfiguration.INVALID_RSSI;