Return optional for telephone number region name for the unknown case to be localized.

This commit is contained in:
Alan Evans
2020-12-09 15:44:45 -04:00
parent ec8793c6fe
commit a8dd81eace
4 changed files with 23 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ public final class CountryListLoader extends AsyncTaskLoader<ArrayList<Map<Strin
for (String region : regions) {
Map<String, String> data = new HashMap<>(2);
data.put("country_name", PhoneNumberFormatter.getRegionDisplayName(region));
data.put("country_name", PhoneNumberFormatter.getRegionDisplayNameLegacy(region));
data.put("country_code", "+" +PhoneNumberUtil.getInstance().getCountryCodeForRegion(region));
results.add(data);
}