From 5b0b167f7fd74d8e238508badb0af2cd6038d522 Mon Sep 17 00:00:00 2001 From: Shaopeng Jia Date: Fri, 24 Jun 2011 13:45:30 +0200 Subject: Uppercase region code so that AsYouTypeFormatter works correctly. Change-Id: Iaf46ec5241a1a8984753bd6d8f9f842884efaa15 --- telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'telephony/java/android') 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); } -- cgit v1.1