camera: enable touch af
Because of the convolution of parameter between CAF and AF, touch AF was
disabled. The final scenario is like this:
scene mode - auto: caf on, touch af on
scene mode - action, night, sunset, party and HDR: caf on, touch af off
Bug: 7437509
Change-Id: I7101ae8d94b8c2de4db136d53536dade33b26d70
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/camera/QCameraHWI_Parm.cpp b/camera/QCameraHWI_Parm.cpp
index 7b1668c..97da6e2 100644
--- a/camera/QCameraHWI_Parm.cpp
+++ b/camera/QCameraHWI_Parm.cpp
@@ -2088,12 +2088,14 @@
}
ALOGV("caf_type %d rc %d", caf_type, rc);
#endif
- } else if((myMode & CAMERA_ZSL_MODE) || !strcmp(str_hdr, "hdr")){
- cafSupport = true;
- caf_type = 2;
- native_set_parms(MM_CAMERA_PARM_CAF_TYPE, sizeof(caf_type), (void *)&caf_type);
}
ALOGV("Continuous Auto Focus %d", cafSupport);
+ if(mAutoFocusRunning && cafSupport){
+ mAutoFocusRunning = false;
+ 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));
+ }
+ }
ret = native_set_parms(MM_CAMERA_PARM_CONTINUOUS_AF, sizeof(cafSupport),
(void *)&cafSupport);
}