Broaden exception handling around Camera#startPreview().

Some devices will randomly throw RuntimeExceptions here due to hardware
issues. We were already doing broader catch statement in CameraView, so
I moved it here as well.
pull/1/head
Greyson Parrelli 7 years ago
parent 444e01deae
commit 5a623810cb

@ -78,7 +78,7 @@ public class Camera1Controller {
camera.setPreviewTexture(surfaceTexture);
camera.startPreview();
enforcer.markCompleted(Stage.PREVIEW_STARTED);
} catch (IOException e) {
} catch (Exception e) {
Log.w(TAG, "Failed to start preview.", e);
eventListener.onCameraUnavailable();
}

Loading…
Cancel
Save