Update deprecated Intent and Bundle functions#18061
Update deprecated Intent and Bundle functions#18061irfano merged 13 commits intofeature/update-compile-sdk-33from
Conversation
CompatExtensions contains extension functions for deprecated functions of Bundle and Intent.
|
@ParaskP7, I have made changes based on your suggestions and applied your patches from your comment on the draft PR. There may be slight differences from your patch due to changes in some codes after syncing with the Question (❓): This PR has not yet updated deprecated functions on Java files, and there are currently 154 usages of deprecated functions on Java files. I can't use the current extension functions in CopatExtensions as they are inline functions and hence inaccessible from Java files.
Personally, I prefer option 2 and prioritize Kotlin migration in our process. Wdyt? |
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | WordPress | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | 4c32fd4 | |
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | Jetpack | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | 4c32fd4 | |
ParaskP7
left a comment
There was a problem hiding this comment.
👋 @irfano !
I have reviewed and tested this PR as per the instructions, everything works as expected, great work on this!!! 🌟 🌟 🌟
I have left a couple of question/info comments for you (❓/ℹ️ ), one suggestions (💡) and some minor (🔍) comments for you to consider, plus praises (❤️).
I am going to approve this PR anyway, since none is blocking. I am NOT going to merge this PR yet to give you some time to apply any of my suggestions. However, feel free to ignore them and merge the PR yourself.
About you question (❓) here, I agree with you, let's take option (2.) and update these functions at a later time, when/if we migrate those Java files to Kotlin, or else otherwise, when we are forced to update at that point when an SDK update will remove those deprecated APIs for good. 👍
PS: Maybe you would like to create an issue on that so that we are aware of this and could potentially pick this work up at some point in the future. Wdyt? 🤔
WordPress/src/main/java/org/wordpress/android/ui/activitylog/list/ActivityLogListFragment.kt
Show resolved
Hide resolved
...g/wordpress/android/ui/bloggingprompts/onboarding/BloggingPromptsOnboardingDialogFragment.kt
Outdated
Show resolved
Hide resolved
...Press/src/main/java/org/wordpress/android/ui/comments/unified/UnifiedCommentsEditActivity.kt
Outdated
Show resolved
Hide resolved
...Press/src/main/java/org/wordpress/android/ui/comments/unified/UnifiedCommentsEditFragment.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/domains/DomainRegistrationDetailsFragment.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/stories/StoryComposerActivity.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/JetpackRemoteInstallActivity.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/util/extensions/CompatExtensions.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/util/extensions/CompatExtensions.kt
Outdated
Show resolved
Hide resolved
...s/src/test/java/org/wordpress/android/ui/accounts/login/jetpack/LoginNoSitesViewModelTest.kt
Show resolved
Hide resolved
Generated by 🚫 dangerJS |
No, thank you for applying all my suggestions, you are a beautiful human being @irfano ! 🙇 ❤️ 🚀 PS: Just for next time, feel free to skip any minor (🔍) comments, especially when those are subjective. I am just leaving those there for us to discuss and together become better engineers! 🤗
Thank you so much for doing that! 🙇 ❤️ |
|
FYI @irfano that I only have 2 comments of mine left unresolved. However, please feel free to merge this PR when you are ready, it is still a ✅ from my side! |
I really appreciate those comments. Let's keep up the good work! 💪🏻
I have resolved them and am currently merging. |


This PR is part of a parent PR to update compileSdk to 33.
The functions below were deprecated on Android 13.
Intent.getParcelableExtra()Intent.getSerializableExtra()Bundle.getParcelable()Bundle.getParcelableArrayList()Bundle.getSerializable()To update these functions for Android 13, there are ready-to-use functions in IntentCompat and BundleCompat, but they're available on the
androidx.core:1.10.0-beta01version, which is not stable yet. I usedCompatExtensionsthat I created to update deprecated functions.To test:
Being able to build and basic smoke test should be enough.
Regression Notes
Potential unintended areas of impact
Navigation between screens may result in unintended behaviors.
What I did to test those areas of impact (or what existing automated tests I relied on)
I debugged suspicious changes manually.
What automated tests I added (or what prevented me from doing so)
Updated existing tests.
PR submission checklist:
RELEASE-NOTES.txtif necessary.