Describe the bug
We get UiAutomation errors ONLY when running for the first time screenshot tests that use SystemTestRule or ActivityScenarioForActivityRule(systemLocale = "myLocale") on emulators/devices with API 23-27. Afterwards the error does not happen anymore.
Environment
The setup in which the bug is reproducible:
Additional context
This happens because the CHANGE_CONFIGURATION permission is granted on SystemTestRule creation.
We should delay it till needed -> we do change the locale. At that moment the test is already running and UiAutomator is available
Describe the bug We get UiAutomation errors ONLY when running for the first time screenshot tests that use SystemTestRule or ActivityScenarioForActivityRule(systemLocale = "myLocale") on emulators/devices with API 23-27. Afterwards the error does not happen anymore.
Environment The setup in which the bug is reproducible:
Expected behavior No UiAutomator error happening
Additional context This happens because the CHANGE_CONFIGURATION permission is granted on SystemTestRule creation. We should delay it till needed -> we do change the locale. At that moment the test is already running and UiAutomator is available