Search in sources :

Example 91 with LocaleList

use of android.os.LocaleList in project android_frameworks_base by crdroidandroid.

the class LocaleUtilsTest method testFilterByLanguageEmptySource.

@SmallTest
public void testFilterByLanguageEmptySource() throws Exception {
    final ArrayList<Locale> availableLocales = new ArrayList<>();
    final LocaleList preferredLocales = LocaleList.forLanguageTags("fr,en-US,ja-JP");
    final ArrayList<Locale> dest = new ArrayList<>();
    LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
    assertEquals(0, dest.size());
}
Also used : Locale(java.util.Locale) LocaleList(android.os.LocaleList) ArrayList(java.util.ArrayList) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

LocaleList (android.os.LocaleList)91 Locale (java.util.Locale)39 ArrayList (java.util.ArrayList)31 SmallTest (android.test.suitebuilder.annotation.SmallTest)15 Resources (android.content.res.Resources)10 KeyboardLayout (android.hardware.input.KeyboardLayout)10 SmallTest (android.support.test.filters.SmallTest)10 InputMethodSubtype (android.view.inputmethod.InputMethodSubtype)10 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)7 RemoteException (android.os.RemoteException)7 FileNotFoundException (java.io.FileNotFoundException)7 IOException (java.io.IOException)7 Context (android.content.Context)5 Config (android.content.pm.ActivityInfo.Config)5 NotFoundException (android.content.res.Resources.NotFoundException)5 TypedArray (android.content.res.TypedArray)5 XmlResourceParser (android.content.res.XmlResourceParser)5 Bundle (android.os.Bundle)5 SettingNotFoundException (android.provider.Settings.SettingNotFoundException)5 VisibleForTesting (com.android.internal.annotations.VisibleForTesting)5