am 3ae2bb01: am 60ae2617: Merge "If frameworks wants ASCII casing, it should explicity ask for it."

* commit '3ae2bb01de967de941cb7c7904346f441ec8d063':
  If frameworks wants ASCII casing, it should explicity ask for it.
This commit is contained in:
Elliott Hughes
2013-08-02 17:58:33 -07:00
committed by Android Git Automerger
2 changed files with 4 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
package android.net; package android.net;
import android.util.Log; import android.util.Log;
import java.util.Locale;
/** /**
* Describes the buildtime configuration of a network. * Describes the buildtime configuration of a network.
@@ -63,7 +64,7 @@ public class NetworkConfig {
*/ */
public NetworkConfig(String init) { public NetworkConfig(String init) {
String fragments[] = init.split(","); String fragments[] = init.split(",");
name = fragments[0].trim().toLowerCase(); name = fragments[0].trim().toLowerCase(Locale.ROOT);
type = Integer.parseInt(fragments[1]); type = Integer.parseInt(fragments[1]);
radio = Integer.parseInt(fragments[2]); radio = Integer.parseInt(fragments[2]);
priority = Integer.parseInt(fragments[3]); priority = Integer.parseInt(fragments[3]);

View File

@@ -25,6 +25,7 @@ import android.util.Log;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.util.Locale;
/** /**
* A container class for the http proxy info * A container class for the http proxy info
@@ -87,7 +88,7 @@ public class ProxyProperties implements Parcelable {
if (mExclusionList == null) { if (mExclusionList == null) {
mParsedExclusionList = new String[0]; mParsedExclusionList = new String[0];
} else { } else {
String splitExclusionList[] = exclusionList.toLowerCase().split(","); String splitExclusionList[] = exclusionList.toLowerCase(Locale.ROOT).split(",");
mParsedExclusionList = new String[splitExclusionList.length * 2]; mParsedExclusionList = new String[splitExclusionList.length * 2];
for (int i = 0; i < splitExclusionList.length; i++) { for (int i = 0; i < splitExclusionList.length; i++) {
String s = splitExclusionList[i].trim(); String s = splitExclusionList[i].trim();