Uppercase region code so that AsYouTypeFormatter works correctly.
Change-Id: Iaf46ec5241a1a8984753bd6d8f9f842884efaa15
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user