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

Get the app version name from BuildConfig instead of PackageManager for UserAgent #7149

Closed
wants to merge 1 commit into from

Conversation

aafanasev
Copy link

Description

ClientConfigurator class is in the app module. It has access to BuildConfig which contains VERSION_NAME. No need to use PackageManager.

Checklist

@ByteHamster
Copy link
Member

Hi, thanks for your PR. Does using PackageManager take measurably more time than taking BuildConfig? I think if it doesn't, I would just keep it as is because that makes it easier to move the file to a different module later.

@aafanasev
Copy link
Author

It's definitely faster than searching among all installed apps by package name as constants will be "inserted" at compilation time. However, it's not a bottleneck, if you prefer DevX over the minor performance that's ok.

@aafanasev aafanasev closed this Apr 30, 2024
@aafanasev aafanasev deleted the build-version branch May 5, 2024 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants