-
Notifications
You must be signed in to change notification settings - Fork 6k
maybeGetInitialRouteFromIntent: check if URI data getPath() is null #29766
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java
Show resolved
Hide resolved
|
Looks good to me but I don't know how to test this. cc @blasten for thoughts. |
shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java
Show resolved
Hide resolved
blasten
left a comment
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.
needs test
|
cc @blasten. The test has been added per the suggestion. Please take another look. |
blasten
left a comment
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.
LGTM
|
The linter failure is real. @icota Can you patch that please so we can land this? |
https://developer.android.com/reference/android/net/Uri?hl=da#getPath() getPath returns a null in case of non-hierachical URIs like mailto This avoids the app crashing with: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference
|
Thanks for letting me know @chinmaygarde. Fixed in 8f9e9ed |
getPath returns a null in case of non-hierachical URIs like
mailtoThis PR avoids the app crashing with:
Fixes flutter/flutter#75261
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.