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

[camera] Improving handling when camera permissions are not granted. #2848

Merged
merged 2 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.8+4

* Fixed bug caused by casting a `CameraAccessException` on Android.

## 0.5.8+3

* Fix bug in usage example in README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ private void instantiateCamera(MethodCall call, Result result) throws CameraAcce
private void handleException(Exception exception, Result result) {
if (exception instanceof CameraAccessException) {
result.error("CameraAccess", exception.getMessage(), null);
return;
}

// CameraAccessException can not be cast to a RuntimeException.
throw (RuntimeException) exception;
}
}
2 changes: 1 addition & 1 deletion packages/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.5.8+3
version: 0.5.8+4

homepage: https://github.com/flutter/plugins/tree/master/packages/camera

Expand Down