* commit '5d6b7db5d9cb7de5cee45dd35af18e179f01d583': When wifi wants ASCII lowercasing, it needs to ask for it.
This commit is contained in:
@@ -26,6 +26,7 @@ import java.net.InetAddress;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Describes the state of any Wifi connection that is active or
|
||||
@@ -275,7 +276,7 @@ public class WifiInfo implements Parcelable {
|
||||
return SupplicantState.FOUR_WAY_HANDSHAKE;
|
||||
else {
|
||||
try {
|
||||
return SupplicantState.valueOf(stateName.toUpperCase());
|
||||
return SupplicantState.valueOf(stateName.toUpperCase(Locale.ROOT));
|
||||
} catch (IllegalArgumentException e) {
|
||||
return SupplicantState.INVALID;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ import java.io.PrintWriter;
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.Iterator;
|
||||
@@ -2515,7 +2516,7 @@ public class WifiStateMachine extends StateMachine {
|
||||
case CMD_SET_COUNTRY_CODE:
|
||||
String country = (String) message.obj;
|
||||
if (DBG) log("set country code " + country);
|
||||
if (!mWifiNative.setCountryCode(country.toUpperCase())) {
|
||||
if (!mWifiNative.setCountryCode(country.toUpperCase(Locale.ROOT))) {
|
||||
loge("Failed to set country code " + country);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -184,7 +184,7 @@ public class WifiP2pDnsSdServiceInfo extends WifiP2pServiceInfo {
|
||||
* | Type (2) | Version (1) |
|
||||
*/
|
||||
if (dnsType == WifiP2pDnsSdServiceInfo.DNS_TYPE_TXT) {
|
||||
dnsName = dnsName.toLowerCase();
|
||||
dnsName = dnsName.toLowerCase(Locale.ROOT); // TODO: is this right?
|
||||
}
|
||||
sb.append(compressDnsName(dnsName));
|
||||
sb.append(String.format(Locale.US, "%04x", dnsType));
|
||||
|
||||
@@ -169,7 +169,7 @@ public class WifiP2pServiceRequest implements Parcelable {
|
||||
}
|
||||
|
||||
// check whether query is hex string.
|
||||
query = query.toLowerCase();
|
||||
query = query.toLowerCase(Locale.ROOT);
|
||||
char[] chars = query.toCharArray();
|
||||
for (char c: chars) {
|
||||
if (!((c >= '0' && c <= '9') ||
|
||||
|
||||
Reference in New Issue
Block a user