Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Move HashSet construction within if-statement
  • Loading branch information
JeroenWeener committed Mar 15, 2023
commit aecc76f95419a16ff56118a2a0cd41ab3df4d2f7
4 changes: 4 additions & 0 deletions packages/image_picker/image_picker_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.6+2

* Fixes null pointer exception in `saveResult`.

## 0.8.6+1

* Refactors code in preparation for adopting Pigeon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ String retrievePendingCameraMediaUriPath() {
void saveResult(
@Nullable ArrayList<String> path, @Nullable String errorCode, @Nullable String errorMessage) {

Set<String> imageSet = new HashSet<>();
imageSet.addAll(path);
SharedPreferences.Editor editor = prefs.edit();
if (path != null) {
Set<String> imageSet = new HashSet<>();
imageSet.addAll(path);
editor.putStringSet(FLUTTER_IMAGE_PICKER_IMAGE_PATH_KEY, imageSet);
}
if (errorCode != null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/image_picker/image_picker_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the image_picker plugin.
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22

version: 0.8.6+1
version: 0.8.6+2

environment:
sdk: ">=2.17.0 <3.0.0"
Expand Down