From 624ac719d6d3dd596fc697ce587cc6bb9e33845f Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Wed, 13 Jul 2016 11:18:36 +0200 Subject: 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 --- src/plugins/android/src/mediacapture/qandroidcamerasession.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp index 1689a55b4..635a51152 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() -- cgit v1.2.3