From c8004a2ddbde3a8dce6391229216e2d15583d680 Mon Sep 17 00:00:00 2001 From: Akwasi Boateng Date: Wed, 19 Oct 2011 21:35:58 -0500 Subject: CameraHAL: allow set preview resolution when preview is enabled Fixes b/5397081 Allow preview resolution to be changed while previewing and also ignore stop preview while recording app should call stop recording. Change-Id: I85d0388f3fb2cd12593ab225389bda022cbd938b Signed-off-by: Iliyan Malchev --- camera/CameraHal.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'camera/CameraHal.cpp') diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index c99af92..3610559 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -339,10 +339,6 @@ int CameraHal::setParameters(const CameraParameters& params) } - //CTS requirement, we should be able to change the preview resolution - //while in paused display state - if ( !previewEnabled() || mDisplayPaused ) - { params.getPreviewSize(&w, &h); if (w == -1 && h == -1) { CAMHAL_LOGEA("Unable to get preview size"); @@ -393,7 +389,6 @@ int CameraHal::setParameters(const CameraParameters& params) } CAMHAL_LOGDB("PreviewResolution by App %d x %d", w, h); - } // Handle RECORDING_HINT to Set/Reset Video Mode Parameters valstr = params.get(CameraParameters::KEY_RECORDING_HINT); @@ -1738,7 +1733,7 @@ void CameraHal::stopPreview() { LOG_FUNCTION_NAME; - if(!previewEnabled() && !mDisplayPaused) + if( (!previewEnabled() && !mDisplayPaused) || mRecordingEnabled) { LOG_FUNCTION_NAME_EXIT; return; -- cgit v1.1