Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2aac6020 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "libcameraservice: allow skipping of autofocus callbacks" into gingerbread

parents dd3ff3e2 1cea441c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -122,4 +122,8 @@ ifeq ($(BOARD_HAS_OMAP3_FW3A_LIBCAMERA), true)
    LOCAL_CFLAGS += -DOMAP3_FW3A_LIBCAMERA
endif

ifeq ($(BOARD_LIBCAMERA_MISSING_AUTOFOCUS), true)
    LOCAL_CFLAGS += -DLIBCAMERA_MISSING_AUTOFOCUS
endif

include $(BUILD_SHARED_LIBRARY)
+11 −0
Original line number Diff line number Diff line
@@ -1147,6 +1147,12 @@ bool CameraService::Client::recordingEnabled() {
}

status_t CameraService::Client::autoFocus() {
#ifdef LIBCAMERA_MISSING_AUTOFOCUS
    // skip autofocus callback
    notifyCallback(CAMERA_MSG_FOCUS, 1, 0, 0);
    return NO_ERROR;
#endif

    LOG1("autoFocus (pid %d)", getCallingPid());

    Mutex::Autolock lock(mLock);
@@ -1157,6 +1163,11 @@ status_t CameraService::Client::autoFocus() {
}

status_t CameraService::Client::cancelAutoFocus() {
#ifdef LIBCAMERA_MISSING_AUTOFOCUS
    // skip autofocus cancellation
    return NO_ERROR;
#endif

    LOG1("cancelAutoFocus (pid %d)", getCallingPid());

    Mutex::Autolock lock(mLock);