Skip to content

Update deprecated PackageManager functions#18077

Merged
irfano merged 2 commits intofeature/update-compile-sdk-33from
update-deprecated-packagamanager-functions
Mar 15, 2023
Merged

Update deprecated PackageManager functions#18077
irfano merged 2 commits intofeature/update-compile-sdk-33from
update-deprecated-packagamanager-functions

Conversation

@irfano
Copy link
Copy Markdown
Member

@irfano irfano commented Mar 9, 2023

This PR is part of a parent PR to update compileSdk to 33.

PackageManager#getActivityInfo(ComponentName, int) and PackageManager#getPackageInfo(String, int) were deprecated on Android 13. Extension functions have been added to CopatExtensions to replace deprecated functions.

To test:
Being able to build and basic smoke test should be enough.

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    This doesn't introduce any change, so no tests added.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@wpmobilebot
Copy link
Copy Markdown
Contributor

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr18077-6c1911c.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit6c1911c
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Copy Markdown
Contributor

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr18077-6c1911c.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit6c1911c
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@irfano irfano mentioned this pull request Mar 9, 2023
8 tasks
@irfano irfano changed the title Update deprecated packagamanager functions Update deprecated PackageManager functions Mar 10, 2023
@ParaskP7 ParaskP7 self-assigned this Mar 10, 2023
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @irfano !

I have reviewed and tested this PR as per the instructions, everything works as expected, good job! 🌟 🌟 🌟


Suggestion (💡): Although the changes you made is VERY straightforward, when the parent PR is to be tested, I would suggest testing these ActivityInfo + PackageInfo changes too, which seems to be mainly touching the below app classes/functionalities:

  • DeepLinkingIntentReceiverActivity.kt Cc @zwarm
  • LocalMigrationContentProvider.kt Cc @mkevins
  • JetpackAppMigrationFlowUtils.kt Cc @ovitrif
  • AppStatus.kt Cc @RenanLukas

I've cc'ed a bunch of people here, that I've seen have been working on those lately, just to be on the safe side in case we are missing something obvious.

@irfano
Copy link
Copy Markdown
Member Author

irfano commented Mar 14, 2023

Suggestion (💡): Although the changes you made is VERY straightforward, when the parent PR is to be tested, I would suggest testing these ActivityInfo + PackageInfo changes too, which seems to be mainly touching the below app classes/functionalities:

  • DeepLinkingIntentReceiverActivity.kt Cc @zwarm
  • LocalMigrationContentProvider.kt Cc @mkevins
  • JetpackAppMigrationFlowUtils.kt Cc @ovitrif
  • AppStatus.kt Cc @RenanLukas

I've cc'ed a bunch of people here, that I've seen have been working on those lately, just to be on the safe side in case we are missing something obvious.

I haven't tested all cases on possible impacted features. However, I have tested the results of PackageManager.getActivityInfoCompat() and PackageManager.getPackageInfoCompat(), and they work as expected.
I have also smoke tested deep links and migration, and they work as expected as well. I believe we can merge this, @ParaskP7!

@ParaskP7
Copy link
Copy Markdown
Contributor

Great, thanks @irfano and definitely, feel free to merge this whenever you're ready! 🚀

@irfano irfano merged commit bb9c0d1 into feature/update-compile-sdk-33 Mar 15, 2023
@irfano irfano deleted the update-deprecated-packagamanager-functions branch March 15, 2023 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants