-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Prevent processing media if the Uri is null or if mLocalMediaUris is … #19947
Conversation
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
WordPress/src/main/java/org/wordpress/android/ui/ShareIntentReceiverActivity.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the quick fix @geriux 🙇
I wasn't able to reproduce the issue but checking the crash stack traces your fixes look good to me 👍
I left a suggestion at https://github.com/wordpress-mobile/WordPress-Android/pull/19947/files#r1452499476
Generated by 🚫 dangerJS |
Yeah I only was able to reproduce it on one of my testing devices, here's a recording of the steps I followed to get it to crash: Screenrecorder-2024-01-15-17-36-07-701.mp4 |
Thank you for the recording @geriux 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #19943
Fixes #19944
This is a regression from #19754
It will prevent the app from crashing when
mLocalMediaUris
is empty.There are a few cases where the media image can't be fetched and this prevents the app from crashing, the image won't be added but at least the app remains open. This is a known issue.
To Test:
Note
I could only reproduce it on a Redmi Note 8T using Android 11 while sharing an image from the File Explorer app. This prevents a crash when the media can't be added, now the app will remain open but the Image won't be added, hopefully will work on fixing this issue soon. So I propose testing the sharing feature overall:
PDF
,jpg
, andmp4
.Extra test case
TestCase1.mov
TestCase2.mov
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
N/A
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.