Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocaleTestRule not working for the first test only if < API 27 #3

Closed
sergio-sastre opened this issue Mar 7, 2022 · 2 comments
Closed
Projects

Comments

@sergio-sastre
Copy link
Owner

sergio-sastre commented Mar 7, 2022

Describe the bug
LocaleTestRule not working for the first test only if < API 27

Environment
The setup in which the bug is reproducible:

  • Device or Emulator: Emulator
  • API level: < API 27
  • AndroidUiTestingUtils version: 1.0.0
  • Affected Component: Activity (ONLY) -> LocaleTestRule
  • Buggy Configuration: Locale

Expected behavior
It displays the following error:

Caused by: java.lang.SecurityException: Permission Denial: updateConfiguration() from pid=28072, uid=10065 requires android.permission.CHANGE_CONFIGURATION

although the permission is added in debug/manifest

Remarks:

  1. Does not happen on API 27+.
  2. Only the first test is buggy. The locale change becomes effective afterwards on every test.
@sergio-sastre
Copy link
Owner Author

This will be fixed once the AppCompatDelegate reaches the 1.6.0 release version, including AppCompatDelegate.setApplicationLocales()

https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.0-alpha04

@sergio-sastre sergio-sastre added this to Ready for release in 1.1.2 Jun 19, 2022
@sergio-sastre sergio-sastre moved this from Ready for release to To do in 1.1.2 Jun 19, 2022
@sergio-sastre sergio-sastre moved this from To do to Ready for release in 1.1.2 Jun 21, 2022
@sergio-sastre
Copy link
Owner Author

solved in 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1.1.2
Ready for release
Development

No branches or pull requests

1 participant