From fcf878529ccd950e5c15b6c72a00d51e8020cf21 Mon Sep 17 00:00:00 2001 From: "alexander.melnikov" Date: Fri, 4 May 2018 17:55:01 +0300 Subject: [PATCH] Fixed crash when openning broken camera --- .../src/main/java/com/otaliastudios/cameraview/Camera1.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java b/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java index 6ff4347a..a6c1263e 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java @@ -269,7 +269,8 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera } LOG.e("Error inside the onError callback.", error); - throw new CameraException(new RuntimeException(CameraLogger.lastMessage)); +// throw new CameraException(new RuntimeException(CameraLogger.lastMessage)); + mCameraCallbacks.dispatchError(new CameraException(new RuntimeException(CameraLogger.lastMessage))); } @Override