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

Commit a0e33d0a authored by Andrew Dodd's avatar Andrew Dodd
Browse files

camera: Add missing QCOM_HARDWARE #ifdefs

http://review.cyanogenmod.com/#/c/18206/2 was
missing a few QCOM_HARDWARE #ifdefs even though its origin
was CAF.  So far, 18206 has only had positive effects on
certain QCOM devices, and is a noop or breaks things on
non-QCOM.

Per discussion with arcee - #ifdef the rest as QCOM

Change-Id: I46684ef5e6c580137104ad81b4faf58858bbfdd3
parent 4dbd01b5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -115,10 +115,12 @@ public:
        LOGV("%s(%s) buf %p", __FUNCTION__, mName.string(), buf.get());

        if (mDevice->ops->set_preview_window) {
#ifdef QCOM_HARDWARE
            LOGV("%s buf %p mPreviewWindow %p", __FUNCTION__, buf.get(), mPreviewWindow.get());
            if (mPreviewWindow.get() && (buf.get() != mPreviewWindow.get())) {
                 mDevice->ops->set_preview_window(mDevice, 0);
            }
#endif

            mPreviewWindow = buf;
            mHalPreviewWindow.user = this;
+4 −0
Original line number Diff line number Diff line
@@ -528,7 +528,9 @@ void CameraService::Client::disconnect() {

    // Release the held ANativeWindow resources.
    if (mPreviewWindow != 0) {
#ifdef QCOM_HARDWARE
        mHardware->setPreviewWindow(0);
#endif
        disconnectWindow(mPreviewWindow);
        mPreviewWindow = 0;
    }
@@ -570,8 +572,10 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder,
            native_window_set_buffers_transform(window.get(), mOrientation);
            result = mHardware->setPreviewWindow(window);
        }
#ifdef QCOM_HARDWARE
    } else {
        result = mHardware->setPreviewWindow(window);
#endif
    }

    if (result == NO_ERROR) {