camera: restarting caf after liveshot
CAF can be restarted after liveshot using
cancel autofocus command.
Bug: 7718056
Change-Id: Ic807ca1f5aa8acdd81891f4e2df82be7ff5d425d
diff --git a/camera/QCameraHWI.cpp b/camera/QCameraHWI.cpp
index a8f6df4..746da68 100755
--- a/camera/QCameraHWI.cpp
+++ b/camera/QCameraHWI.cpp
@@ -1621,6 +1621,7 @@
ALOGE("%s: Error : returned from takePictureLiveshot",__func__);
return;
}
+ pme->setCAFLockCancel();
ALOGV("%s: X", __func__);
}
diff --git a/camera/QCameraHWI_Parm.cpp b/camera/QCameraHWI_Parm.cpp
index cccc759..959178e 100644
--- a/camera/QCameraHWI_Parm.cpp
+++ b/camera/QCameraHWI_Parm.cpp
@@ -4291,15 +4291,15 @@
status_t QCameraHardwareInterface::setCAFLockCancel(void)
{
ALOGV("%s : E", __func__);
- status_t rc = NO_ERROR;
- int32_t value;
//for CAF unlock
- value = 1;
- rc = (native_set_parms(MM_CAMERA_PARM_CAF_LOCK_CANCEL, sizeof(int32_t), (void *)(&value))) ?
- NO_ERROR : UNKNOWN_ERROR;
+ if(MM_CAMERA_OK!=cam_ops_action(mCameraId,false,MM_CAMERA_OPS_FOCUS,NULL )) {
+ ALOGE("%s: AF command failed err:%d error %s",__func__, errno,strerror(errno));
+ return -1;
+ }
+
ALOGV("%s : X", __func__);
- return rc;
+ return NO_ERROR;
}
void QCameraHardwareInterface::prepareVideoPicture(bool disable){