capawesome-team / capacitor-plugins

⚡️ Community plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/
172 stars 25 forks source link

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

Closed co-dax closed 3 months ago

co-dax commented 3 months ago

… API 33: Android 13.0 (Tiramisu).

Close https://github.com/capawesome-team/capacitor-plugins/issues/131

Pull request checklist

Please check if your PR fulfills the following requirements:

co-dax commented 3 months ago

Done.

On Sat, Feb 3, 2024 at 9:34 PM Robin Genz @.***> wrote:

@.**** requested changes on this pull request.

Thank you for your contribution.

In packages/app-update/android/src/main/java/io/capawesome/capacitorjs/plugins/appupdate/AppUpdatePlugin.java https://github.com/capawesome-team/capacitor-plugins/pull/134#discussion_r1477123569 :

@@ -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).

Please remove the comment. The code should be enough.

In packages/app-update/android/src/main/java/io/capawesome/capacitorjs/plugins/appupdate/AppUpdatePlugin.java https://github.com/capawesome-team/capacitor-plugins/pull/134#discussion_r1477123591 :

@@ -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);

Please remove the empty line.

— Reply to this email directly, view it on GitHub https://github.com/capawesome-team/capacitor-plugins/pull/134#pullrequestreview-1861121089, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ6CNHAZYY3UWSYW6FECC3YR2NO5AVCNFSM6AAAAABCYIBPTSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNRRGEZDCMBYHE . You are receiving this because you authored the thread.Message ID: @.***>

robingenz commented 3 months ago

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

I close this for #135.