am 5ae312fb: am 759e0d6a: Merge "Fix LocalePicker locale filtering."

* commit '5ae312fb5b601d2c60e197f94c6a292700776140':
  Fix LocalePicker locale filtering.
This commit is contained in:
Narayan Kamath
2014-07-04 09:22:57 +00:00
committed by Android Git Automerger

View File

@@ -131,7 +131,8 @@ public class LocalePicker extends ListFragment {
final ArrayList<LocaleInfo> localeInfos = new ArrayList<LocaleInfo>(localeList.size());
for (String locale : localeList) {
final Locale l = Locale.forLanguageTag(locale.replace('_', '-'));
if (l == null || "und".equals(l.getLanguage())) {
if (l == null || "und".equals(l.getLanguage())
|| l.getLanguage().isEmpty() || l.getCountry().isEmpty()) {
continue;
}