diff options
author | Tor Norbye <tnorbye@google.com> | 2012-01-06 09:29:25 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-01-06 09:29:25 -0800 |
commit | 18bce12c5916331971b2e8108f8485cc56b696d3 (patch) | |
tree | 2c634dc2e09bf68bfe21faa0674c208e62017c71 /sdkmanager/libs/sdkuilib | |
parent | 9f338c0725644f84597366c1e4acb680a72b3f00 (diff) | |
download | sdk-18bce12c5916331971b2e8108f8485cc56b696d3.zip sdk-18bce12c5916331971b2e8108f8485cc56b696d3.tar.gz sdk-18bce12c5916331971b2e8108f8485cc56b696d3.tar.bz2 |
Fix locale handling of uppercase/lowercase
This changeset fixes issue
23747: i and İ character problem in turkish operating Systems...
and probably many other bugs in the Turkish locale.
Basically, we had a lot of String.toLowerCase() and
String.toUpperCase() calls. This performs locale sensitive
conversions, which in many cases is NOT what we want; for "machine
readable" conversions we should be using Locale.US which performs no
special cases.
For more, see
http://developer.android.com/reference/java/util/Locale.html#default_locale
Change-Id: I996b0e70fb377e8dae484c5811deb8bc9afb684c
Diffstat (limited to 'sdkmanager/libs/sdkuilib')
-rwxr-xr-x | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java index 03b5a5b..fa2e360 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java @@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.Display; import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
@@ -101,7 +102,7 @@ public class ImageFactory { if (clz.endsWith(Package.class.getSimpleName())) {
String name = clz.replaceFirst(Package.class.getSimpleName(), "") //$NON-NLS-1$
.replace("SystemImage", "sysimg") //$NON-NLS-1$ //$NON-NLS-2$
- .toLowerCase();
+ .toLowerCase(Locale.US);
name += "_pkg_16.png"; //$NON-NLS-1$
return getImageByName(name);
}
|