Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
[camera] Fix crashes on some Android devices
Browse files Browse the repository at this point in the history
  • Loading branch information
najeira committed Jan 14, 2021
1 parent edda73d commit 974ed0b
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 974ed0b

Please sign in to comment.