Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b829a9d authored by Elliott Hughes's avatar Elliott Hughes Committed by elektroschmock
Browse files

When wifi wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Ibf25d0bbc76015cf8353ec01ab2b743cbc2bde67

Conflicts:

	wifi/java/android/net/wifi/WifiStateMachine.java

If frameworks wants ASCII casing, it should explicity ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4

If graphics wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: I13c106985302335dbb15bb9176d35ec6b4546d4e

If media wants ASCII lowercasing, it needs to ask for it.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Use toLowerCase(Locale.ROOT) if you want ASCII for machine consumption,
and use toLowerCase(Locale.getDefault()) if you want the user's locale's
casing rules for human consumption.

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Id9005a17e34217a81bef3b40031b9e2e6272f45d
parent 767d2ac4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7046,7 +7046,7 @@ public class Intent implements Parcelable, Cloneable {
            return null;
        }

        type = type.trim().toLowerCase(Locale.US);
        type = type.trim().toLowerCase(Locale.ROOT);

        final int semicolonIndex = type.indexOf(';');
        if (semicolonIndex != -1) {
+1 −1
Original line number Diff line number Diff line
@@ -1364,7 +1364,7 @@ public class DatabaseUtils {
        if (sql.length() < 3) {
            return STATEMENT_OTHER;
        }
        String prefixSql = sql.substring(0, 3).toUpperCase(Locale.US);
        String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT);
        if (prefixSql.equals("SEL")) {
            return STATEMENT_SELECT;
        } else if (prefixSql.equals("INS") ||
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.net;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;

@@ -84,7 +85,7 @@ public class MailTo {
                }
                // insert the headers with the name in lowercase so that
                // we can easily find common headers
                m.mHeaders.put(Uri.decode(nameval[0]).toLowerCase(), 
                m.mHeaders.put(Uri.decode(nameval[0]).toLowerCase(Locale.ROOT),
                        nameval.length > 1 ? Uri.decode(nameval[1]) : null);
            }
        }
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.net;

import android.util.Log;
import java.util.Locale;

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

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