Replace a call to a deprecated method to update context with the new one.

Fixes #9736
master
Fumiaki Yoshimatsu 2020-07-09 17:41:46 -04:00 committed by Greyson Parrelli
parent 4271700046
commit 5f0d384c9e
1 changed files with 1 additions and 3 deletions

View File

@ -20,9 +20,7 @@ public final class DynamicLanguageContextWrapper {
final Configuration config = resources.getConfiguration();
final Configuration newConfig = copyWithNewLocale(config, newLocale);
resources.updateConfiguration(newConfig, resources.getDisplayMetrics());
return context;
return context.createConfigurationContext(newConfig);
}
private static Configuration copyWithNewLocale(Configuration config, Locale locale) {