Skip to content

Commit

Permalink
updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
g-apparence committed Nov 19, 2020
1 parent 42a4dc2 commit 77a7177
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- [Android] onDetachedFromActivity : fix stopping the camera should be only done if camera has been started
- listen native Orientation should be canceled correctly on dispose CameraAwesomeState
- unlock focus now restart session correctly after taking a photo
- takePicture listener now cannot send result more than one time
## 0.1.2
- [Android] get luminosity level from device
- [Android] apply brightness correction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,27 @@ private void _handleAutoFocus(final MethodCall call, final Result result) {

private CameraPicture.OnImageResult createTakePhotoResultListener(final Result result) {
return new CameraPicture.OnImageResult() {
boolean sent = false;

@Override
public void onSuccess() {
if(sent) {
return;
}
try {
sent = true;
result.success(null);
} catch (IllegalStateException e) {
Log.e(TAG, "onSuccess image error", e);
}
}

@Override
public void onFailure(String error) {
if(sent) {
return;
}
sent = true;
result.error(error, "", "");
}
};
Expand Down

0 comments on commit 77a7177

Please sign in to comment.