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

* commit '759e0d6a7a258dbc34a38a7db320827eb9144487':
  Fix LocalePicker locale filtering.
This commit is contained in:
Narayan Kamath
2014-07-04 08:48:58 +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;
}