Commit cd4a2bd
Use ConfigurationCompat for locale access in I18nManagerModule (#55663)
Summary:
Pull Request resolved: #55663
Replace the direct `configuration.locales[0]` call with `ConfigurationCompat.getLocales()` from AndroidX, which handles the API level check internally. Falls back to `Locale.getDefault()` if the locale list is empty.
Changelog: [Internal]
----
Reviewed By: mdvacca, NickGerleman
Differential Revision: D93943818
fbshipit-source-id: 8dd1e700a4b50e0c02c76ca8dbd2358b247a5df41 parent 421de23 commit cd4a2bd
1 file changed
Lines changed: 4 additions & 1 deletion
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
0 commit comments