diff options
author | Tyler Luu <tluu@ti.com> | 2011-09-28 14:14:09 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-10-07 12:29:22 -0700 |
commit | eca9906d37a8cc71332bdaceb65b7f41aaf90c21 (patch) | |
tree | 9da74283d14872dab3316c74a8b406e29ee9851c /camera/AppCallbackNotifier.cpp | |
parent | 6cd6e6f0f952d68e0301b58f7c77422448f51730 (diff) | |
download | hardware_ti_omap4-eca9906d37a8cc71332bdaceb65b7f41aaf90c21.zip hardware_ti_omap4-eca9906d37a8cc71332bdaceb65b7f41aaf90c21.tar.gz hardware_ti_omap4-eca9906d37a8cc71332bdaceb65b7f41aaf90c21.tar.bz2 |
omap4xxx: camera: timing issue with autoFocus/cancelAutoFocus
Fixes b/5332895
If cancelAutoFocus comes when Ducati is already sending focus
callback, CameraHal will go ahead and send focus callback to
the application. This can cause the subsequent autoFocus call
to be acked almost immediately with the previous autoFocus call's
notification. Application will think autoFocus is done while
CamearHal is still focusing, takePicture from the application
will return an error.
To fix this issue, do not always send focus notification. We are
going to internally enable/disable auto focus message. Enable focus
message when autoFocus call comes and disable focus message after
notification or if cancelAutoFocus call comes. This will prevent us
from sending notify message if application calls cancelAutoFocus.
Change-Id: I8c8892f14894e23a9d73fa1c2b058389d196eefa
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'camera/AppCallbackNotifier.cpp')
-rw-r--r-- | camera/AppCallbackNotifier.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp index a69cfc0..cc53fb4 100644 --- a/camera/AppCallbackNotifier.cpp +++ b/camera/AppCallbackNotifier.cpp @@ -352,6 +352,7 @@ void AppCallbackNotifier::notifyEvent() ( mCameraHal->msgTypeEnabled(CAMERA_MSG_FOCUS) ) ) { mNotifyCb(CAMERA_MSG_FOCUS, true, 0, mCallbackCookie); + mCameraHal->disableMsgType(CAMERA_MSG_FOCUS); } else if ( focusEvtData->focusError && ( NULL != mCameraHal ) && @@ -359,6 +360,7 @@ void AppCallbackNotifier::notifyEvent() ( mCameraHal->msgTypeEnabled(CAMERA_MSG_FOCUS) ) ) { mNotifyCb(CAMERA_MSG_FOCUS, false, 0, mCallbackCookie); + mCameraHal->disableMsgType(CAMERA_MSG_FOCUS); } break; |