Home
last modified time | relevance | path

Searched refs:LocaleInfo (Results 1 – 18 of 18) sorted by relevance

/frameworks/base/core/java/com/android/internal/app/
DLocaleStore.java47 private static final HashMap<String, LocaleInfo> sLocaleCache = new HashMap<>();
51 public static class LocaleInfo implements Serializable { class in LocaleStore
105 private LocaleInfo(Locale locale) { in LocaleInfo() method in LocaleStore.LocaleInfo
116 private LocaleInfo(String localeId) { in LocaleInfo() method in LocaleStore.LocaleInfo
120 private LocaleInfo(LocaleInfo localeInfo) { in LocaleInfo() method in LocaleStore.LocaleInfo
337 for (LocaleInfo li : sLocaleCache.values()) { in updateSimCountries()
343 li.mSuggestionFlags |= LocaleInfo.SUGGESTION_TYPE_SIM; in updateSimCountries()
356 public static LocaleInfo getAppActivatedLocaleInfo(Context context, String appPackageName, in getAppActivatedLocaleInfo()
369 LocaleInfo cacheInfo = getLocaleInfo(locale, sLocaleCache); in getAppActivatedLocaleInfo()
370 LocaleInfo localeInfo = new LocaleInfo(cacheInfo); in getAppActivatedLocaleInfo()
[all …]
DAppLocaleCollector.java48 private LocaleStore.LocaleInfo mAppCurrentLocale;
49 private Set<LocaleStore.LocaleInfo> mAllAppActiveLocales;
50 private Set<LocaleStore.LocaleInfo> mImeLocales;
61 public LocaleStore.LocaleInfo getAppCurrentLocale() { in getAppCurrentLocale()
70 public Set<LocaleStore.LocaleInfo> getAllAppActiveLocales() { in getAllAppActiveLocales()
73 HashSet<LocaleStore.LocaleInfo> result = new HashSet<>(); in getAllAppActiveLocales()
75 HashMap<String, LocaleStore.LocaleInfo> map = new HashMap<>(); in getAllAppActiveLocales()
78 LocaleStore.LocaleInfo localeInfo = LocaleStore.getAppActivatedLocaleInfo( in getAllAppActiveLocales()
97 public Set<LocaleStore.LocaleInfo> getActiveImeLocales() { in getActiveImeLocales()
98 Set<LocaleStore.LocaleInfo> activeImeLocales = null; in getActiveImeLocales()
[all …]
DSuggestedLocaleAdapter.java63 protected ArrayList<LocaleStore.LocaleInfo> mLocaleOptions;
64 protected ArrayList<LocaleStore.LocaleInfo> mOriginalLocaleOptions;
75 public SuggestedLocaleAdapter(Set<LocaleStore.LocaleInfo> localeOptions, boolean countryMode) { in SuggestedLocaleAdapter()
79 public SuggestedLocaleAdapter(Set<LocaleStore.LocaleInfo> localeOptions, boolean countryMode, in SuggestedLocaleAdapter()
85 for (LocaleStore.LocaleInfo li : localeOptions) { in SuggestedLocaleAdapter()
116 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getItemViewType()
132 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getItemViewType()
245 LocaleStore.LocaleInfo info = (LocaleStore.LocaleInfo) getItem(position); in getView()
283 if (((LocaleStore.LocaleInfo) getItem(position)).isAppCurrentLocale()) { in getNewViewIfNeeded()
352 ArrayList<LocaleStore.LocaleInfo> values; in performFiltering()
[all …]
DLocalePicker.java67 public static class LocaleInfo implements Comparable<LocaleInfo> { class in LocalePicker
73 public LocaleInfo(String label, Locale locale) { in LocaleInfo() method in LocalePicker.LocaleInfo
93 public int compareTo(LocaleInfo another) { in compareTo()
140 public static List<LocaleInfo> getAllAssetLocales(Context context, boolean isInDeveloperMode) { in getAllAssetLocales()
151 final ArrayList<LocaleInfo> localeInfos = new ArrayList<LocaleInfo>(localeList.size()); in getAllAssetLocales()
167 localeInfos.add(new LocaleInfo(toTitleCase(l.getDisplayLanguage(l)), l)); in getAllAssetLocales()
173 final LocaleInfo previous = localeInfos.get(localeInfos.size() - 1); in getAllAssetLocales()
186 localeInfos.add(new LocaleInfo(toTitleCase( in getAllAssetLocales()
193 localeInfos.add(new LocaleInfo(displayName, l)); in getAllAssetLocales()
206 public static ArrayAdapter<LocaleInfo> constructAdapter(Context context) { in constructAdapter()
[all …]
DBilingualSuggestedLocaleAdapter.java42 private LocaleStore.LocaleInfo mSelectedLocaleInfo;
45 Set<LocaleStore.LocaleInfo> localeOptions, in BilingualSuggestedLocaleAdapter()
52 Set<LocaleStore.LocaleInfo> localeOptions, in BilingualSuggestedLocaleAdapter()
105 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getView()
118 public void setSelectedLocaleInfo(LocaleStore.LocaleInfo info) { in setSelectedLocaleInfo()
124 public LocaleStore.LocaleInfo getSelectedLocaleInfo() { in getSelectedLocaleInfo()
128 private boolean isSelectedLocaleInfo(LocaleStore.LocaleInfo item) { in isSelectedLocaleInfo()
164 private void setLocaleToListItem(View itemView, LocaleStore.LocaleInfo localeInfo) { in setLocaleToListItem()
DLocalePickerWithRegion.java54 private Set<LocaleStore.LocaleInfo> mLocaleList;
55 private LocaleStore.LocaleInfo mParentLocale;
76 void onLocaleSelected(LocaleStore.LocaleInfo locale); in onLocaleSelected()
87 Set<LocaleStore.LocaleInfo> getSupportedLocaleList(LocaleStore.LocaleInfo parent, in getSupportedLocaleList()
95 LocaleSelectedListener listener, LocaleStore.LocaleInfo parent, in createNumberingSystemPicker()
107 LocaleSelectedListener listener, LocaleStore.LocaleInfo parent, in createCountryPicker()
161 private boolean setListener(LocaleSelectedListener listener, LocaleStore.LocaleInfo parent, in setListener()
265 final LocaleStore.LocaleInfo locale = in onListItemClick()
266 (LocaleStore.LocaleInfo) parent.getAdapter().getItem(position); in onListItemClick()
DSystemLocaleCollector.java52 public Set<LocaleStore.LocaleInfo> getSupportedLocaleList(LocaleStore.LocaleInfo parent, in getSupportedLocaleList()
55 Set<LocaleStore.LocaleInfo> localeList; in getSupportedLocaleList()
DLocaleHelper.java210 public static final class LocaleInfoComparator implements Comparator<LocaleStore.LocaleInfo> {
250 public int compare(LocaleStore.LocaleInfo lhs, LocaleStore.LocaleInfo rhs) { in compare()
/frameworks/base/tests/Internal/src/com/android/internal/app/
DLocaleStoreTest.java30 import com.android.internal.app.LocaleStore.LocaleInfo;
55 Set<LocaleInfo> localeSet = LocaleStore.transformImeLanguageTagToLocaleInfo(list); in testTransformImeLanguageTagToLocaleInfo()
59 for (LocaleInfo info : localeSet) { in testTransformImeLanguageTagToLocaleInfo()
60 assertEquals(info.mSuggestionFlags, LocaleInfo.SUGGESTION_TYPE_IME_LANGUAGE); in testTransformImeLanguageTagToLocaleInfo()
74 Set<LocaleInfo> localeSet = LocaleStore.transformImeLanguageTagToLocaleInfo(list); in testTransformImeLanguageTagToLocaleInfo_duplicateTagFilter()
78 for (LocaleInfo info : localeSet) { in testTransformImeLanguageTagToLocaleInfo_duplicateTagFilter()
79 assertEquals(info.mSuggestionFlags, LocaleInfo.SUGGESTION_TYPE_IME_LANGUAGE); in testTransformImeLanguageTagToLocaleInfo_duplicateTagFilter()
86 Collection<LocaleInfo> supportedLocale = getFakeSupportedLocales(); in convertExplicitLocales_noExplicitLcoales_returnEmptyHashMap()
88 HashMap<String, LocaleInfo> result = in convertExplicitLocales_noExplicitLcoales_returnEmptyHashMap()
99 Collection<LocaleInfo> supportedLocale = getFakeSupportedLocales(); in convertExplicitLocales_hasEmptyLocale_receiveException()
[all …]
DAppLocaleCollectorTest.java34 import com.android.internal.app.LocaleStore.LocaleInfo;
54 private LocaleStore.LocaleInfo mAppCurrentLocale;
55 private Set<LocaleInfo> mAllAppActiveLocales;
56 private Set<LocaleInfo> mImeLocales;
57 private Set<LocaleInfo> mSystemCurrentLocales;
58 private Set<LocaleInfo> mSystemSupportedLocales;
61 private static final int NONE = LocaleInfo.SUGGESTION_TYPE_NONE;
62 private static final int SIM = LocaleInfo.SUGGESTION_TYPE_SIM;
63 private static final int CFG = LocaleInfo.SUGGESTION_TYPE_CFG;
65 private static final int CURRENT = LocaleInfo.SUGGESTION_TYPE_CURRENT;
[all …]
/frameworks/opt/localepicker/src/com/android/localepicker/
DLocaleStore.java37 private static final HashMap<String, LocaleInfo> sLocaleCache = new HashMap<>();
40 public static class LocaleInfo implements Serializable { class in LocaleStore
59 private LocaleInfo(Locale locale) { in LocaleInfo() method in LocaleStore.LocaleInfo
69 private LocaleInfo(String localeId) { in LocaleInfo() method in LocaleStore.LocaleInfo
230 for (LocaleInfo li : sLocaleCache.values()) { in updateSimCountries()
236 li.mSuggestionFlags |= LocaleInfo.SUGGESTION_TYPE_SIM; in updateSimCountries()
254 for (LocaleInfo li : sLocaleCache.values()) { in addSuggestedLocalesForRegion()
257 li.mSuggestionFlags |= LocaleInfo.SUGGESTION_TYPE_SIM; in addSuggestedLocalesForRegion()
276 LocaleInfo li = new LocaleInfo(locale); in fillCache()
282 li.mSuggestionFlags |= LocaleInfo.SUGGESTION_TYPE_SIM; in fillCache()
[all …]
DSuggestedLocaleAdapter.java63 private ArrayList<LocaleStore.LocaleInfo> mLocaleOptions;
64 private ArrayList<LocaleStore.LocaleInfo> mOriginalLocaleOptions;
73 public SuggestedLocaleAdapter(Set<LocaleStore.LocaleInfo> localeOptions, boolean countryMode) { in SuggestedLocaleAdapter()
76 for (LocaleStore.LocaleInfo li : localeOptions) { in SuggestedLocaleAdapter()
128 public LocaleStore.LocaleInfo getItem(int position) { in getItem()
206 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getView()
255 ArrayList<LocaleStore.LocaleInfo> values; in performFiltering()
266 final ArrayList<LocaleStore.LocaleInfo> newValues = new ArrayList<>(); in performFiltering()
269 final LocaleStore.LocaleInfo value = values.get(i); in performFiltering()
307 mLocaleOptions = (ArrayList<LocaleStore.LocaleInfo>) results.values; in publishResults()
[all …]
DLocaleHelper.java181 public static final class LocaleInfoComparator implements Comparator<LocaleStore.LocaleInfo> {
219 public int compare(LocaleStore.LocaleInfo lhs, LocaleStore.LocaleInfo rhs) { in compare()
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DBilingualSuggestedLocaleAdapterTest.java24 import com.android.internal.app.LocaleStore.LocaleInfo;
39 private HashSet<LocaleInfo> mLocaleOptions;
40 private HashSet<LocaleInfo> mEnglishCountryOptions;
48 LocaleInfo korea = LocaleStore.getLocaleInfo(Locale.KOREA); in setUp()
50 korea.mSuggestionFlags = LocaleInfo.SUGGESTION_TYPE_SIM; in setUp()
60 LocaleInfo australianEnglish = LocaleStore.getLocaleInfo(Locale.forLanguageTag("en-AU")); in setUp()
62 australianEnglish.mSuggestionFlags = LocaleInfo.SUGGESTION_TYPE_SIM; in setUp()
123 LocaleInfo localeInfo = (LocaleInfo) adapter.getItem(position); in getLocaleTagList()
/frameworks/opt/localepicker/tests/src/com/android/localepicker/
DSuggestedLocaleAdapterTest.java22 import com.android.localepicker.LocaleStore.LocaleInfo;
38 private HashSet<LocaleInfo> mLocaleOptions;
39 private HashSet<LocaleInfo> mEnglishCountryOptions;
47 LocaleInfo korea = LocaleStore.getLocaleInfo(Locale.KOREA); in setUp()
49 korea.mSuggestionFlags = LocaleInfo.SUGGESTION_TYPE_SIM; in setUp()
59 LocaleInfo australianEnglish = LocaleStore.getLocaleInfo(Locale.forLanguageTag("en-AU")); in setUp()
61 australianEnglish.mSuggestionFlags = LocaleInfo.SUGGESTION_TYPE_SIM; in setUp()
132 LocaleInfo localeInfo = adapter.getItem(position); in getLocaleTagList()
DLocaleHelperTest.java22 import com.android.localepicker.LocaleStore.LocaleInfo;
73 LocaleInfo germany = LocaleStore.getLocaleInfo(Locale.GERMANY); in localeInfoComparator_shouldSortLocales()
74 LocaleInfo unitedStates = LocaleStore.getLocaleInfo(Locale.US); in localeInfoComparator_shouldSortLocales()
75 LocaleInfo japan = LocaleStore.getLocaleInfo(Locale.JAPAN); in localeInfoComparator_shouldSortLocales()
77 ArrayList<LocaleInfo> list = in localeInfoComparator_shouldSortLocales()
DLocaleStoreTest.java29 import com.android.localepicker.LocaleStore.LocaleInfo;
63 LocaleInfo localeInfo = LocaleStore.getLocaleInfo(Locale.forLanguageTag("zh-Hant-HK")); in getLevel()
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiCecLocalDevicePlayback.java37 import com.android.internal.app.LocalePicker.LocaleInfo;
504 final List<LocaleInfo> localeInfos = LocalePicker.getAllAssetLocales( in handleSetMenuLanguage()
506 for (LocaleInfo localeInfo : localeInfos) { in handleSetMenuLanguage()