[Cleanup] Removed redundant API 21(Lollipop) or lower version checks as the minimum SDK version is 21
This commit is contained in:
parent
aefd52c12e
commit
de14e72689
11 changed files with 36 additions and 68 deletions
|
@ -29,18 +29,10 @@ public class LanguageContextWrapper extends ContextWrapper {
|
|||
LocaleList localeList = new LocaleList(newLocale);
|
||||
LocaleList.setDefault(localeList);
|
||||
configuration.setLocales(localeList);
|
||||
|
||||
context = context.createConfigurationContext(configuration);
|
||||
|
||||
} else if (VersionUtils.INSTANCE.hasLollipop()) {
|
||||
configuration.setLocale(newLocale);
|
||||
context = context.createConfigurationContext(configuration);
|
||||
|
||||
} else {
|
||||
configuration.locale = newLocale;
|
||||
res.updateConfiguration(configuration, res.getDisplayMetrics());
|
||||
configuration.setLocale(newLocale);
|
||||
}
|
||||
|
||||
context = context.createConfigurationContext(configuration);
|
||||
return new LanguageContextWrapper(context);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue