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

Use Updated Android Locale API #30701

Closed
wants to merge 2 commits into from

Conversation

aarongrider
Copy link

Summary

This change migrates fetching locale information from the deprecated Android locale api to the new locale api on sdk version 30+. The old api was deprecated some time ago and should not be used.

https://developer.android.com/reference/android/content/res/Configuration#locale

Changelog

[Android] [Changed] - Use new Locale API on Android 11 (API 30)+

Test Plan

if (Platform.OS === 'android') {
  locale = NativeModules.I18nManager.localeIdentifier; // returns ex. 'EN_us'
}

@facebook-github-bot
Copy link
Contributor

Hi @aarongrider!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@aarongrider aarongrider changed the title Use new Android locale api Use new Android Locale API Jan 7, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 7, 2021
@aarongrider aarongrider changed the title Use new Android Locale API Use Updated Android Locale API Jan 7, 2021
@react-native-bot react-native-bot added the Platform: Android Android applications. label Jan 7, 2021
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

@analysis-bot
Copy link

analysis-bot commented Jan 7, 2021

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a950634

@analysis-bot
Copy link

analysis-bot commented Jan 7, 2021

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,957,376 +28
android hermes armeabi-v7a 8,490,657 +30
android hermes x86 9,377,591 +24
android hermes x86_64 9,342,906 +19
android jsc arm64-v8a 10,639,505 -87
android jsc armeabi-v7a 9,560,307 -83
android jsc x86 10,654,005 -85
android jsc x86_64 11,263,005 -86

Base commit: a950634

@lunaleaps lunaleaps self-assigned this Sep 7, 2021
@lunaleaps
Copy link
Contributor

@aarongrider Do you mind rebasing and resolving conflicts?

@aarongrider
Copy link
Author

All set @lunaleaps! Let me know if you need anything else.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Sep 8, 2021
@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@lunaleaps merged this pull request in b7c023a.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 8, 2021
@aarongrider aarongrider deleted the android-locale branch September 9, 2021 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Needs: Attention Issues where the author has responded to feedback. p: Expo Partner: Expo Partner Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants