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

This reverts commit 5f0d384c9e.

Introduced a bug where the system theme wasn't changing until app
restart.
master
Greyson Parrelli 2020-08-14 00:18:23 -04:00
parent a73427d68d
commit f84c8229de
1 changed files with 3 additions and 1 deletions

View File

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