summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-07-13 11:18:36 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-08-12 11:17:48 +0000
commit624ac719d6d3dd596fc697ce587cc6bb9e33845f (patch)
treed31eaf3e3667d671833687aef2a2b0c06e32444f
parentd78e0716dd97ea0c874928bcde0531fda297703a (diff)
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>
-rw-r--r--src/plugins/android/src/mediacapture/qandroidcamerasession.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
index 1689a55b..635a5115 100644
--- a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
+++ b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp
@@ -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()