Merge "When wifi ssid is empty, return WifiSsid.NONE" am: 4af5c34
am: eef758c
* commit 'eef758cb01df94642ddf1a50ccc434b4a4b343fc':
When wifi ssid is empty, return WifiSsid.NONE
Change-Id: I179f5641cf98fdce947c4f61a2dd1d52595952b4
This commit is contained in:
@@ -320,7 +320,8 @@ public class WifiInfo implements Parcelable {
|
|||||||
if (!TextUtils.isEmpty(unicode)) {
|
if (!TextUtils.isEmpty(unicode)) {
|
||||||
return "\"" + unicode + "\"";
|
return "\"" + unicode + "\"";
|
||||||
} else {
|
} else {
|
||||||
return mWifiSsid.getHexString();
|
String hex = mWifiSsid.getHexString();
|
||||||
|
return (hex != null) ? hex : WifiSsid.NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return WifiSsid.NONE;
|
return WifiSsid.NONE;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ public class WifiSsid implements Parcelable {
|
|||||||
for (int i = 0; i < octets.size(); i++) {
|
for (int i = 0; i < octets.size(); i++) {
|
||||||
out += String.format(Locale.US, "%02x", ssidbytes[i]);
|
out += String.format(Locale.US, "%02x", ssidbytes[i]);
|
||||||
}
|
}
|
||||||
return out;
|
return (octets.size() > 0) ? out : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Implement the Parcelable interface {@hide} */
|
/** Implement the Parcelable interface {@hide} */
|
||||||
|
|||||||
Reference in New Issue
Block a user