use of android.icu.text.Collator in project android_packages_apps_Settings by omnirom.
the class RegionSearchPicker method createAdapterItem.
private List<RegionItem> createAdapterItem(Set<String> regionIds) {
final Collator collator = Collator.getInstance(getLocale());
final TreeSet<RegionItem> items = new TreeSet<>(new RegionInfoComparator(collator));
final LocaleDisplayNames localeDisplayNames = LocaleDisplayNames.getInstance(getLocale());
long i = 0;
for (String regionId : regionIds) {
String name = localeDisplayNames.regionDisplayName(regionId);
items.add(new RegionItem(i++, regionId, name));
}
return new ArrayList<>(items);
}
Aggregations