Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11724
The problem was related to the string array
app_theme_entries
. This array is used to present to the user the options they have for the app theme preference. For Android 8 and below, it has only two options:light
anddark
. For Android 9 and above, it has a third option:default
.This string array wasn't supposed to be translatable, but it wasn't marked as so at first, causing it to be erroneously replicated to the
strings.xml
file of the following locales:ar
,de
,en-gb
,es
,es-MX
,es-VE
,fr
,he
,id
,it
,ja
,nl
,pl
,ro
,ru
,sq
,sv
,tr
,zh-CN
,zh-HK
,zh-TW
.Due to how Android resolves alternative resource files, locale qualifiers almost always takes precedence, meaning a string array defined for a specific locale always overrides a string array defined for a specific OS version.
Because of that, if the user had one of those languages selected and was using a device with Android 9 or above, that app preference would only load two options instead of three, and since the default option in those cases is the third one, which was missing, an
ArrayIndexOutOfBoundsException
was thrown, crashing the app.This PR marks the string array
app_theme_entries
as not translatable and removes all the instances where it was erroneously replicated to thestrings.xml
file of the affected locales.To test
Notes
PR submission checklist:
RELEASE-NOTES.txt
if necessary.