From bc2e82d45432f7bd546d0fcc57e1ad1816ade9a3 Mon Sep 17 00:00:00 2001 From: Shaopeng Jia Date: Fri, 1 Jul 2011 15:04:50 +0200 Subject: [PATCH] Remove explicit toUpperCase after CountryDetector is fixed to return uppercase region code. Change-Id: I111d5792b67eb0e16a7278a731097f305cb9a059 --- .../telephony/PhoneNumberFormattingTextWatcher.java | 3 --- .../com/android/internal/telephony/CallerInfo.java | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java index dea67f35bfde9..ffabb7b6e72e0 100644 --- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java +++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java @@ -94,9 +94,6 @@ 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); } diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java index ab93e2a90ea9c..68e0045eda459 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfo.java +++ b/telephony/java/com/android/internal/telephony/CallerInfo.java @@ -526,16 +526,6 @@ public class CallerInfo { + countryIso); } - // Temp workaround: The current libphonenumber library requires - // the countryIso to be uppercase (e.g. "US") but the - // detector.detectCountry().getCountryIso() call currently returns - // "us". Passing "us" to util.parse() will just result in a - // NumberParseException. - // So force the countryIso to uppercase for now. - // TODO: remove this once getCountryIso() is fixed to always - // return uppercase. - countryIso = countryIso.toUpperCase(); - PhoneNumber pn = null; try { if (VDBG) Log.v(TAG, "parsing '" + number