Android: restart preview when image capture fails

The preview must be restarted after taking a picture but were doing
that only when the capture succeeded. We now also do it when it fails.

Change-Id: I8bfff06a811d9333220050e5e81561438f5a3786
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
This commit is contained in:
Yoann Lopes
2016-07-13 11:18:36 +02:00
parent d78e0716dd
commit 624ac719d6

View File

@@ -563,6 +563,9 @@ void QAndroidCameraSession::onCameraTakePictureFailed()
{
emit imageCaptureError(m_currentImageCaptureId, QCameraImageCapture::ResourceError,
tr("Failed to capture image"));
// Preview needs to be restarted and the preview call back must be setup again
m_camera->startPreview();
}
void QAndroidCameraSession::onCameraPictureExposed()