Loading core/java/com/android/internal/app/LocaleStore.java +14 −0 Original line number Diff line number Diff line Loading @@ -126,12 +126,18 @@ public class LocaleStore { return mFullCountryNameNative; } String getFullCountryNameInUiLanguage() { // We don't cache the UI name because the default locale keeps changing return LocaleHelper.getDisplayCountry(mLocale); } /** Returns the name of the locale in the language of the UI. * It is used for search, but never shown. * For instance German will show as "Deutsch" in the list, but we will also search for * "allemand" if the system UI is in French. */ public String getFullNameInUiLanguage() { // We don't cache the UI name because the default locale keeps changing return LocaleHelper.getDisplayName(mLocale, true /* sentence case */); } Loading @@ -154,6 +160,14 @@ public class LocaleStore { } } String getContentDescription(boolean countryMode) { if (countryMode) { return getFullCountryNameInUiLanguage(); } else { return getFullNameInUiLanguage(); } } public boolean getChecked() { return mIsChecked; } Loading core/java/com/android/internal/app/SuggestedLocaleAdapter.java +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable { LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); text.setText(item.getLabel(mCountryMode)); text.setTextLocale(item.getLocale()); text.setContentDescription(item.getContentDescription(mCountryMode)); if (mCountryMode) { int layoutDir = TextUtils.getLayoutDirectionFromLocale(item.getParent()); //noinspection ResourceType Loading Loading
core/java/com/android/internal/app/LocaleStore.java +14 −0 Original line number Diff line number Diff line Loading @@ -126,12 +126,18 @@ public class LocaleStore { return mFullCountryNameNative; } String getFullCountryNameInUiLanguage() { // We don't cache the UI name because the default locale keeps changing return LocaleHelper.getDisplayCountry(mLocale); } /** Returns the name of the locale in the language of the UI. * It is used for search, but never shown. * For instance German will show as "Deutsch" in the list, but we will also search for * "allemand" if the system UI is in French. */ public String getFullNameInUiLanguage() { // We don't cache the UI name because the default locale keeps changing return LocaleHelper.getDisplayName(mLocale, true /* sentence case */); } Loading @@ -154,6 +160,14 @@ public class LocaleStore { } } String getContentDescription(boolean countryMode) { if (countryMode) { return getFullCountryNameInUiLanguage(); } else { return getFullNameInUiLanguage(); } } public boolean getChecked() { return mIsChecked; } Loading
core/java/com/android/internal/app/SuggestedLocaleAdapter.java +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable { LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); text.setText(item.getLabel(mCountryMode)); text.setTextLocale(item.getLocale()); text.setContentDescription(item.getContentDescription(mCountryMode)); if (mCountryMode) { int layoutDir = TextUtils.getLayoutDirectionFromLocale(item.getParent()); //noinspection ResourceType Loading