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() { protected void resetLocale() {
Locale locale = new Locale("en");
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources(); Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
Configuration defaultConfig = resources.getConfiguration(); Configuration config = resources.getConfiguration();
defaultConfig.setLocale(Locale.getDefault()); config.setLocale(locale);
resources.updateConfiguration(defaultConfig, null); resources.updateConfiguration(config, null);
} }
protected void screenshot(View view) { protected void screenshot(View view) {