summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authornewt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-05 15:33:13 +0000
committernewt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-05 15:33:13 +0000
commitf937f4df3a8bf73766aa2dd784e422ca73ea2fe0 (patch)
tree7f1468e1341ceee558b2dae4198ce4d43d4f6c19 /remoting
parent29343ec0ee0140a7cc4d95290e5ab74025cdba78 (diff)
downloadchromium_src-f937f4df3a8bf73766aa2dd784e422ca73ea2fe0.zip
chromium_src-f937f4df3a8bf73766aa2dd784e422ca73ea2fe0.tar.gz
chromium_src-f937f4df3a8bf73766aa2dd784e422ca73ea2fe0.tar.bz2
Fix several usages of the default locale in Java code.
BUG=316522 NOTRY=true Review URL: https://codereview.chromium.org/187023003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/HostListLoader.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java b/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
index b9d1c54..59800a8 100644
--- a/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
+++ b/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
@@ -21,6 +21,7 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.Locale;
import java.util.Scanner;
/** Helper for fetching the host list. */
@@ -183,12 +184,13 @@ public class HostListLoader {
private static void sortHosts(ArrayList<HostInfo> hosts) {
Comparator<HostInfo> hostComparator = new Comparator<HostInfo>() {
+ @Override
public int compare(HostInfo a, HostInfo b) {
if (a.isOnline != b.isOnline) {
return a.isOnline ? -1 : 1;
}
- String aName = a.name.toUpperCase();
- String bName = b.name.toUpperCase();
+ String aName = a.name.toUpperCase(Locale.getDefault());
+ String bName = b.name.toUpperCase(Locale.getDefault());
return aName.compareTo(bName);
}
};