Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions packages/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.0+1

* Fix a crash when user calls the plugin in quick succession on Android.

## 0.5.0

* **Breaking change**. Migrate from the deprecated original Android Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void onScanCompleted(String path, Uri uri) {

public void chooseVideoFromGallery(MethodCall methodCall, MethodChannel.Result result) {
if (!setPendingMethodCallAndResult(methodCall, result)) {
finishWithAlreadyActiveError();
finishWithAlreadyActiveError(result);
return;
}

Expand All @@ -208,7 +208,7 @@ private void launchPickVideoFromGalleryIntent() {

public void takeVideoWithCamera(MethodCall methodCall, MethodChannel.Result result) {
if (!setPendingMethodCallAndResult(methodCall, result)) {
finishWithAlreadyActiveError();
finishWithAlreadyActiveError(result);
return;
}

Expand Down Expand Up @@ -242,7 +242,7 @@ private void launchTakeVideoWithCameraIntent() {

public void chooseImageFromGallery(MethodCall methodCall, MethodChannel.Result result) {
if (!setPendingMethodCallAndResult(methodCall, result)) {
finishWithAlreadyActiveError();
finishWithAlreadyActiveError(result);
return;
}

Expand All @@ -264,7 +264,7 @@ private void launchPickImageFromGalleryIntent() {

public void takeImageWithCamera(MethodCall methodCall, MethodChannel.Result result) {
if (!setPendingMethodCallAndResult(methodCall, result)) {
finishWithAlreadyActiveError();
finishWithAlreadyActiveError(result);
return;
}

Expand Down Expand Up @@ -482,8 +482,8 @@ private void finishWithSuccess(String imagePath) {
clearMethodCallAndResult();
}

private void finishWithAlreadyActiveError() {
finishWithError("already_active", "Image picker is already active");
private void finishWithAlreadyActiveError(MethodChannel.Result result) {
result.error("already_active", "Image picker is already active", null);
}

private void finishWithError(String errorCode, String errorMessage) {
Expand Down
2 changes: 1 addition & 1 deletion packages/image_picker/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
- Flutter Team <[email protected]>
- Rhodes Davis Jr. <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker
version: 0.5.0
version: 0.5.0+1

flutter:
plugin:
Expand Down