diff options
author | Sundar Raman <sunds@ti.com> | 2011-11-08 11:10:16 -0800 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-11-10 13:48:29 -0800 |
commit | 3ec18006399d61e97382601d14aaa43ee339c8b6 (patch) | |
tree | ebf4a581c181fe06b14e2228c75953934f6c0162 /camera/CameraHal.cpp | |
parent | 2136042f80a20aeeef3ece24bab027c401426334 (diff) | |
download | hardware_ti_omap4xxx-3ec18006399d61e97382601d14aaa43ee339c8b6.zip hardware_ti_omap4xxx-3ec18006399d61e97382601d14aaa43ee339c8b6.tar.gz hardware_ti_omap4xxx-3ec18006399d61e97382601d14aaa43ee339c8b6.tar.bz2 |
CameraHAL: Fixes for ANR and a setParameter issue
Fix 1/3 for b/5593964.
1. Ensure we don't race with stopImageCapture when stopPreview is called
2. Signal the shutter callback correctly
3. Do not crash the media server if focus APIs and image capture returns error
Still go ahead and perform de-init
4. Replace setParameter from CameraHAl to AppCallbackNotifier with getParameter
when needed.
Change-Id: I2b2745827d227a8d7927ce1611a84c29129e8891
Signed-off-by: Sundar Raman <sunds@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'camera/CameraHal.cpp')
-rw-r--r-- | camera/CameraHal.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 1f14a2e..7e18330 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -1008,10 +1008,6 @@ int CameraHal::setParameters(const CameraParameters& params) mParameters.unflatten(oldParams.flatten()); } - if ( NULL != mAppCallbackNotifier.get() ) { - mAppCallbackNotifier->setParameters(mParameters); - } - // Restart Preview if needed by KEY_RECODING_HINT only if preview is already running. // If preview is not started yet, Video Mode parameters will take effect on next startPreview() if (restartPreviewRequired && previewEnabled() && !mRecordingEnabled) { @@ -2222,6 +2218,7 @@ status_t CameraHal::cancelAutoFocus() adapterParams.set(TICameraParameters::KEY_AUTO_FOCUS_LOCK, CameraParameters::FALSE); mCameraAdapter->setParameters(adapterParams); mCameraAdapter->sendCommand(CameraAdapter::CAMERA_CANCEL_AUTOFOCUS); + mAppCallbackNotifier->flushEventQueue(); } LOG_FUNCTION_NAME_EXIT; |