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

#131 PackageManager.getPackageInfo(packageName, 0) is deprecated as of… #134

Closed
wants to merge 1 commit into from

Conversation

co-dax
Copy link
Contributor

@co-dax co-dax commented Feb 3, 2024

… API 33: Android 13.0 (Tiramisu).

Close #131

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.
  • A changeset has been created (npm run changeset).
  • I have read and followed the pull request guidelines.

@co-dax co-dax changed the title #33 PackageManager.getPackageInfo(packageName, 0) is deprecated as of… #131 PackageManager.getPackageInfo(packageName, 0) is deprecated as of… Feb 3, 2024
Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

@@ -227,7 +229,13 @@ private boolean isGooglePlayServicesAvailable() {

private PackageInfo getPackageInfo() throws PackageManager.NameNotFoundException {
String packageName = this.getContext().getPackageName();
return this.getContext().getPackageManager().getPackageInfo(packageName, 0);

// PackageManager.getPackageInfo(packageName, 0) is deprecated as of API 33: Android 13.0 (Tiramisu).
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the comment. The code should be enough.

@@ -227,7 +229,13 @@ private boolean isGooglePlayServicesAvailable() {

private PackageInfo getPackageInfo() throws PackageManager.NameNotFoundException {
String packageName = this.getContext().getPackageName();
return this.getContext().getPackageManager().getPackageInfo(packageName, 0);

Copy link
Member

Choose a reason for hiding this comment

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

Please remove the empty line.

@robingenz robingenz added package: app-update bug/fix Something isn't working labels Feb 3, 2024
@co-dax
Copy link
Contributor Author

co-dax commented Feb 4, 2024 via email

@robingenz
Copy link
Member

Next time, please update the existing PR and do not create a new one.

I close this for #135.

@robingenz robingenz closed this Feb 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working package: app-update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: App Update Android - API level 33 getPackageInfo(String, int) deprecated
2 participants