@Test public void testGetAdjustedDefault() { final LocaleListCompat ll = LocaleListCompat.getDefault(); assertNotNull(ll); assertTrue(ll.size() >= 1); final Locale defaultLocale = Locale.getDefault(); assertTrue(ll.indexOf(defaultLocale) == 0); }
@NonNull @Size(min = 1) public static LocaleListCompat getAdjustedDefault() { if (Build.VERSION.SDK_INT >= 24) { return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); } else { return LocaleListCompat.create(Locale.getDefault()); } }
LocaleListCompat { @NonNull @Size(min = 1) public static LocaleListCompat getAdjustedDefault() { if (Build.VERSION.SDK_INT >= 24) { return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); } else { return LocaleListCompat.create(Locale.getDefault()); } } }
LocaleListCompat { @NonNull @Size(min = 1) public static LocaleListCompat getAdjustedDefault() { if (Build.VERSION.SDK_INT >= 24) { return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); } else { return LocaleListCompat.create(Locale.getDefault()); } } private  LocaleListCompat(); }
LocaleListCompat { @NonNull @Size(min = 1) public static LocaleListCompat getAdjustedDefault() { if (Build.VERSION.SDK_INT >= 24) { return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); } else { return LocaleListCompat.create(Locale.getDefault()); } } private  LocaleListCompat(); @RequiresApi(24) static LocaleListCompat wrap(Object object); @Nullable Object unwrap(); static LocaleListCompat create(@NonNull Locale... localeList); Locale get(int index); boolean isEmpty(); @IntRange(from = 0) int size(); @IntRange(from = -1) int indexOf(Locale locale); @NonNull String toLanguageTags(); Locale getFirstMatch(String[] supportedLocales); @NonNull static LocaleListCompat getEmptyLocaleList(); @NonNull static LocaleListCompat forLanguageTags(@Nullable String list); @NonNull @Size(min = 1) static LocaleListCompat getAdjustedDefault(); @NonNull @Size(min = 1) static LocaleListCompat getDefault(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
LocaleListCompat { @NonNull @Size(min = 1) public static LocaleListCompat getAdjustedDefault() { if (Build.VERSION.SDK_INT >= 24) { return LocaleListCompat.wrap(LocaleList.getAdjustedDefault()); } else { return LocaleListCompat.create(Locale.getDefault()); } } private  LocaleListCompat(); @RequiresApi(24) static LocaleListCompat wrap(Object object); @Nullable Object unwrap(); static LocaleListCompat create(@NonNull Locale... localeList); Locale get(int index); boolean isEmpty(); @IntRange(from = 0) int size(); @IntRange(from = -1) int indexOf(Locale locale); @NonNull String toLanguageTags(); Locale getFirstMatch(String[] supportedLocales); @NonNull static LocaleListCompat getEmptyLocaleList(); @NonNull static LocaleListCompat forLanguageTags(@Nullable String list); @NonNull @Size(min = 1) static LocaleListCompat getAdjustedDefault(); @NonNull @Size(min = 1) static LocaleListCompat getDefault(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }