Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b0b167f authored by Shaopeng Jia's avatar Shaopeng Jia
Browse files

Uppercase region code so that AsYouTypeFormatter works correctly.

Change-Id: Iaf46ec5241a1a8984753bd6d8f9f842884efaa15
parent e4ae4347
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
    }