fix logical error

This commit is contained in:
sonora 2016-05-30 13:14:32 +02:00
parent e67e08bf24
commit 5481c0ebfe
2 changed files with 6 additions and 6 deletions

View file

@ -263,7 +263,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
getString(R.string.lang_vi) + incompleteSuffix, getString(R.string.lang_vi) + incompleteSuffix,
getString(R.string.lang_cy) + incompleteSuffix,}; getString(R.string.lang_cy) + incompleteSuffix,};
String[] valuesPl = ConfigureMapMenu.getSortedMapNamesIds(this, entrieValues, entrieValues); String[] valuesPl = ConfigureMapMenu.getSortedMapNamesIds(this, entrieValues, entrieValues);
String[] idsPl = ConfigureMapMenu.getSortedMapNamesIds(this, entries, valuesPl); String[] idsPl = ConfigureMapMenu.getSortedMapNamesIds(this, entrieValues, entries);
registerListPreference(settings.PREFERRED_LOCALE, screen, valuesPl, idsPl); registerListPreference(settings.PREFERRED_LOCALE, screen, valuesPl, idsPl);
// Display "Device language" in Latin for all non-en languages // Display "Device language" in Latin for all non-en languages

View file

@ -547,11 +547,11 @@ public class ConfigureMapMenu {
if (i1 != i2) { if (i1 != i2) {
return i1 < i2 ? -1 : 1; return i1 < i2 ? -1 : 1;
} }
i1 = lhs.equals(ctx.getString(R.string.system_locale) + " (" + ctx.getString(R.string.system_locale_no_translate) + ")") ? 0 : (lhs.equals(ctx.getString(R.string.lang_en)) ? 1 : 2); //i1 = lhs.equals(ctx.getString(R.string.system_locale) + " (" + ctx.getString(R.string.system_locale_no_translate) + ")") ? 0 : (lhs.equals(ctx.getString(R.string.lang_en)) ? 1 : 2);
i1 = rhs.equals(ctx.getString(R.string.system_locale) + " (" + ctx.getString(R.string.system_locale_no_translate) + ")") ? 0 : (rhs.equals(ctx.getString(R.string.lang_en)) ? 1 : 2); //i2 = rhs.equals(ctx.getString(R.string.system_locale) + " (" + ctx.getString(R.string.system_locale_no_translate) + ")") ? 0 : (rhs.equals(ctx.getString(R.string.lang_en)) ? 1 : 2);
if (i1 != i2) { //if (i1 != i2) {
return i1 < i2 ? -1 : 1; // return i1 < i2 ? -1 : 1;
} //}
return mp.get(lhs).compareTo(mp.get(rhs)); return mp.get(lhs).compareTo(mp.get(rhs));
} }
}); });