From 3746f2d91425e24b23ddf34f2b9afef3f3efc3e2 Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Fri, 24 Jun 2011 15:42:43 -0700 Subject: Use upper case country codes in Country.java Previously external/libphonenumber accepted lower case country codes (e.g. "us") but now it doesn't for performance reason. Actually ISO 3166-1 doesn't allow lower cases, so we should not rely on them. Need to fix unit tests for PhoneNumberUtils, as it implicitly relies on the previous behavior. See also I3a3e6db84ed0d24290b1be19651fa9a82de4cc39 Bug: 4941319 Change-Id: If16f6531f274a0faf5e28724854409ca9b00a669 --- location/java/android/location/Country.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'location') diff --git a/location/java/android/location/Country.java b/location/java/android/location/Country.java index 3c05403..939bd4a 100755 --- a/location/java/android/location/Country.java +++ b/location/java/android/location/Country.java @@ -19,6 +19,8 @@ package android.location; import android.os.Parcel; import android.os.Parcelable; +import java.util.Locale; + /** * This class wraps the country information. * @@ -74,7 +76,7 @@ public class Country implements Parcelable { || source > COUNTRY_SOURCE_LOCALE) { throw new IllegalArgumentException(); } - mCountryIso = countryIso.toLowerCase(); + mCountryIso = countryIso.toUpperCase(Locale.US); mSource = source; } -- cgit v1.1