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

Appcompat version 1.1.0 breaks resource interception #23

Open
pr0t3us opened this issue Nov 14, 2019 · 2 comments · Fixed by crunchyroll/Philology#4 · May be fixed by #38
Open

Appcompat version 1.1.0 breaks resource interception #23

pr0t3us opened this issue Nov 14, 2019 · 2 comments · Fixed by crunchyroll/Philology#4 · May be fixed by #38
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@pr0t3us
Copy link
Contributor

pr0t3us commented Nov 14, 2019

Describe the bug
Updating Appcompat library to 1.1.0 on the app side stop's Philology intercepting the text value on devices with API levels 21-25. Since the problem doesn't reproduce on versions bellow 1.1.0-rc01 most likely it is caused by the 26079d8 commit (diff) with the description:

Turned out to be a gnarly framework bug on API levels 21-25. The test was failing due to the application Resources seemingly being updated when it shouldn't have been. Worked around by always using applyOverrideConfiguration() on those API levels, to force a new Resources instance.

To Reproduce

  1. Update the Appcompat by changing Dependencies#APP_COMPAT_VERSION to 1.1.0 or change implementation Dependencies.appCompat to implementation "androidx.appcompat:appcompat:1.1.0" just for the sample module.
  2. Run the sample app

Expected behavior
Philology should replace the text in the sample app based on the device locale.

Actual behavior
Philology doesn't replace the text in the sample app.

Logs/Screenshots

Library version
2.0.1

@pr0t3us pr0t3us added the bug Something isn't working label Nov 14, 2019
@pr0t3us
Copy link
Contributor Author

pr0t3us commented Nov 14, 2019

As another workaround adding android:configChanges="uiMode" in AndroidManifest prevents from calling applyOverrideConfiguration() when attaching the base context and fixes the problem but that means that the activity should handle the UI mode itself.

@JcMinarro JcMinarro added the help wanted Extra attention is needed label Nov 21, 2019
@Arms-merchants
Copy link

Thanks, I didn't notice that an answer was given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
3 participants