Skip to content

Commit

Permalink
[camera] Fixes crash with using inner camera on some Android devices. (
Browse files Browse the repository at this point in the history
  • Loading branch information
najeira authored and adsonpleal committed Feb 26, 2021
1 parent 09da85d commit 4737ca9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.0+3

* Fixes crash with using inner camera on some Android devices.

## 0.7.0+2

* Improved error feedback by differentiating between uninitialized and disposed camera controllers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ public void open(String imageFormatGroup) throws CameraAccessException {
public void onOpened(@NonNull CameraDevice device) {
cameraDevice = device;
try {
cameraRegions = new CameraRegions(getRegionBoundaries());
startPreview();
dartMessenger.sendCameraInitializedEvent(
previewSize.getWidth(),
Expand Down Expand Up @@ -300,6 +299,8 @@ private void createCaptureSession(
}
}

cameraRegions = new CameraRegions(getRegionBoundaries());

// Prepare the callback
CameraCaptureSession.StateCallback callback =
new CameraCaptureSession.StateCallback() {
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.7.0+2
version: 0.7.0+3
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera

dependencies:
Expand Down

0 comments on commit 4737ca9

Please sign in to comment.