reset local to "en"

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2023-11-01 19:16:40 +01:00
parent 6392255735
commit ea4c357f60
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
5 changed files with 4 additions and 3 deletions

View File

@ -415,10 +415,11 @@ public abstract class AbstractIT {
}
protected void resetLocale() {
Locale locale = new Locale("en");
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
Configuration defaultConfig = resources.getConfiguration();
defaultConfig.setLocale(Locale.getDefault());
resources.updateConfiguration(defaultConfig, null);
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, null);
}
protected void screenshot(View view) {