summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
authorShaopeng Jia <shaopengjia@google.com>2011-06-24 13:45:30 +0200
committerShaopeng Jia <shaopengjia@google.com>2011-06-24 13:50:43 +0200
commit5b0b167f7fd74d8e238508badb0af2cd6038d522 (patch)
treef60ebdb16450b18b0eb4da0ca998066d7dddcc6d /telephony/java/android
parente4ae4347311dfb5529dd076ed0b30dbbe3225c86 (diff)
downloadframeworks_base-5b0b167f7fd74d8e238508badb0af2cd6038d522.zip
frameworks_base-5b0b167f7fd74d8e238508badb0af2cd6038d522.tar.gz
frameworks_base-5b0b167f7fd74d8e238508badb0af2cd6038d522.tar.bz2
Uppercase region code so that AsYouTypeFormatter works correctly.
Change-Id: Iaf46ec5241a1a8984753bd6d8f9f842884efaa15
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
index ffabb7b..dea67f3 100644
--- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
+++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
@@ -94,6 +94,9 @@ public class PhoneNumberFormattingTextWatcher implements TextWatcher {
*/
public PhoneNumberFormattingTextWatcher(String countryCode) {
if (countryCode == null) throw new IllegalArgumentException();
+ // TODO: remove this once CountryDetector.detectCountry().getCountryIso() is fixed to always
+ // return uppercase. Tracked at b/4941319.
+ countryCode = countryCode.toUpperCase(Locale.ENGLISH);
mFormatter = PhoneNumberUtil.getInstance().getAsYouTypeFormatter(countryCode);
}