This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
android/src/main/java/io/flutter/plugins/camera Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.9.4+6
2
+
3
+ * Fixes bug resulting in a ` CameraAccessException ` that prevents image capture on certain devices running Android 7/8.
4
+
1
5
## 0.9.4+5
2
6
3
7
* Fixes bug where calling a method after the camera was closed resulted in a Java ` IllegalStateException ` exception.
Original file line number Diff line number Diff line change @@ -583,8 +583,12 @@ public void onCaptureCompleted(
583
583
};
584
584
585
585
try {
586
- captureSession .stopRepeating ();
587
- captureSession .abortCaptures ();
586
+ if (Build .VERSION .SDK_INT <= Build .VERSION_CODES .O ) {
587
+ captureSession .stopRepeating ();
588
+ } else {
589
+ captureSession .stopRepeating ();
590
+ captureSession .abortCaptures ();
591
+ }
588
592
Log .i (TAG , "sending capture request" );
589
593
captureSession .capture (stillBuilder .build (), captureCallback , backgroundHandler );
590
594
} catch (CameraAccessException e ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
4
4
Dart.
5
5
repository : https://github.com/flutter/plugins/tree/master/packages/camera/camera
6
6
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
7
- version : 0.9.4+5
7
+ version : 0.9.4+6
8
8
9
9
environment :
10
10
sdk : " >=2.14.0 <3.0.0"
You can’t perform that action at this time.
0 commit comments