-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[image_picker_android] Refactor getting of paths from intent to single helper #5009
[image_picker_android] Refactor getting of paths from intent to single helper #5009
Conversation
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Show resolved
Hide resolved
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Outdated
Show resolved
Hide resolved
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Show resolved
Hide resolved
Closing for now, I still want to land this but haven't been able to work on it for a bit and won't be able to for a bit as well |
@gmackall when this fix will be available? |
I came back to this as I remembered I want to reland this - looking back over the comments, I'm not sure why I closed it (I must have misunderstood comments). The consensus seems to be for throwing errors across the methods, which is what the current behavior does. I'm going to re-open, get out of draft, and then request review based on that. |
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
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.
Minor comments, but LGTM
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Outdated
Show resolved
Hide resolved
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Show resolved
Hide resolved
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Show resolved
Hide resolved
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Outdated
Show resolved
Hide resolved
ArrayList<MediaPath> paths = getPathsFromIntent(intent, true); | ||
// If there's no valid Uri, return an error | ||
if (paths == null) { | ||
finishWithError("no_valid_media_uri", "Cannot find the selected media."); |
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.
Ideally we would use the same error code for all of these to make handling easier (until we have structured errors) but since we already have several different code strings and we generally consider changing platform exception error codes breaking since we leak them out of the plugin API surface, I think we're stuck with different codes for now.
(Meaning: no change needed to the PR, just leaving this as a breadcrumb for us to consider in the future.)
...picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Outdated
Show resolved
Hide resolved
flutter/packages@fd714bd...87a02e3 2024-05-15 engine-flutter-autoroll@skia.org Roll Flutter from d2da1b2 to 39651e8 (18 revisions) (flutter/packages#6738) 2024-05-15 stuartmorgan@google.com Update the repo for the 3.22 stable release (flutter/packages#6730) 2024-05-15 linxunfeng@yeah.net [webview_flutter_wkwebview] Fixes JSON.stringify() cannot serialize cyclic structures (flutter/packages#6274) 2024-05-14 louisehsu@google.com [in_app_purchase_storekit] migrate main plugin class to swift in preperation to storekit 2 (flutter/packages#6561) 2024-05-14 34871572+gmackall@users.noreply.github.com [image_picker_android] Refactor getting of paths from intent to single helper (flutter/packages#5009) 2024-05-14 engine-flutter-autoroll@skia.org Roll Flutter (stable) from 54e6646 to 5dcb86f (1402 revisions) (flutter/packages#6727) 2024-05-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Skip `withWeakReferenceTo` integration test (flutter/packages#6731) 2024-05-14 engine-flutter-autoroll@skia.org Roll Flutter from 1255435 to d2da1b2 (26 revisions) (flutter/packages#6729) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter/flutter#104168
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.