diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java index 10d58f5e8792..598bfa522ef5 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java @@ -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(), @@ -300,6 +299,8 @@ private void createCaptureSession( } } + cameraRegions = new CameraRegions(getRegionBoundaries()); + // Prepare the callback CameraCaptureSession.StateCallback callback = new CameraCaptureSession.StateCallback() {