resolved conflicts for merge of 52556689 to gingerbread-plus-aosp

Change-Id: I61ed41f03b635ee760dc4c9d01935ac9fac9703a
This commit is contained in:
Irfan Sheriff
2010-12-01 10:40:05 -08:00

View File

@@ -1462,34 +1462,34 @@ public class WifiStateTracker extends NetworkStateTracker {
} }
private void requestConnectionStatus(WifiInfo info) { private void requestConnectionStatus(WifiInfo info) {
String reply = status();
if (reply == null) {
return;
}
/*
* Parse the reply from the supplicant to the status command, and update
* local state accordingly. The reply is a series of lines of the form
* "name=value".
*/
String SSID = null; String SSID = null;
String BSSID = null; String BSSID = null;
String suppState = null; String suppState = null;
int netId = -1; int netId = -1;
String[] lines = reply.split("\n"); String reply = status();
for (String line : lines) { if (reply != null) {
String[] prop = line.split(" *= *", 2); /*
if (prop.length < 2) * Parse the reply from the supplicant to the status command, and update
continue; * local state accordingly. The reply is a series of lines of the form
String name = prop[0]; * "name=value".
String value = prop[1]; */
if (name.equalsIgnoreCase("id"))
netId = Integer.parseInt(value); String[] lines = reply.split("\n");
else if (name.equalsIgnoreCase("ssid")) for (String line : lines) {
SSID = value; String[] prop = line.split(" *= *");
else if (name.equalsIgnoreCase("bssid")) if (prop.length < 2)
BSSID = value; continue;
else if (name.equalsIgnoreCase("wpa_state")) String name = prop[0];
suppState = value; String value = prop[1];
if (name.equalsIgnoreCase("id"))
netId = Integer.parseInt(value);
else if (name.equalsIgnoreCase("ssid"))
SSID = value;
else if (name.equalsIgnoreCase("bssid"))
BSSID = value;
else if (name.equalsIgnoreCase("wpa_state"))
suppState = value;
}
} }
info.setNetworkId(netId); info.setNetworkId(netId);
info.setSSID(SSID); info.setSSID(SSID);