summaryrefslogtreecommitdiffstats
path: root/camera/libcameraservice/CameraService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera/libcameraservice/CameraService.cpp')
-rw-r--r--camera/libcameraservice/CameraService.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
index f425f6b..bab7d08 100644
--- a/camera/libcameraservice/CameraService.cpp
+++ b/camera/libcameraservice/CameraService.cpp
@@ -798,7 +798,6 @@ static void dump_to_file(const char *fname,
}
#endif
-// take a picture - image is returned in callback
status_t CameraService::Client::autoFocus()
{
LOGD("autoFocus (pid %d)", getCallingPid());
@@ -815,6 +814,22 @@ status_t CameraService::Client::autoFocus()
return mHardware->autoFocus();
}
+status_t CameraService::Client::cancelAutoFocus()
+{
+ LOGD("cancelAutoFocus (pid %d)", getCallingPid());
+
+ Mutex::Autolock lock(mLock);
+ status_t result = checkPid();
+ if (result != NO_ERROR) return result;
+
+ if (mHardware == 0) {
+ LOGE("mHardware is NULL, returning.");
+ return INVALID_OPERATION;
+ }
+
+ return mHardware->cancelAutoFocus();
+}
+
// take a picture - image is returned in callback
status_t CameraService::Client::takePicture()
{