summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/Uri.java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-08-02 10:00:44 -0700
committerElliott Hughes <enh@google.com>2013-08-02 15:12:32 -0700
commitcb64d430627b71221c588ef5f23599dd34a89ee9 (patch)
treeb224300586291ed638185af36a4a25fb6b27efa8 /core/java/android/net/Uri.java
parentc67b2ed50226c4758d0fc1434d39f6add6a0a533 (diff)
downloadframeworks_base-cb64d430627b71221c588ef5f23599dd34a89ee9.zip
frameworks_base-cb64d430627b71221c588ef5f23599dd34a89ee9.tar.gz
frameworks_base-cb64d430627b71221c588ef5f23599dd34a89ee9.tar.bz2
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
Diffstat (limited to 'core/java/android/net/Uri.java')
-rw-r--r--core/java/android/net/Uri.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index 1d1e149..132173d 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -1717,7 +1717,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
if (flag == null) {
return defaultValue;
}
- flag = flag.toLowerCase();
+ flag = flag.toLowerCase(Locale.ROOT);
return (!"false".equals(flag) && !"0".equals(flag));
}
@@ -1745,7 +1745,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
public Uri normalizeScheme() {
String scheme = getScheme();
if (scheme == null) return this; // give up
- String lowerScheme = scheme.toLowerCase(Locale.US);
+ String lowerScheme = scheme.toLowerCase(Locale.ROOT);
if (scheme.equals(lowerScheme)) return this; // no change
return buildUpon().scheme(lowerScheme).build();