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

Commit e1445da7 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

camera2: Don't log vendor tag errors when camera HAL too old

Change-Id: Iac3d23284230c95c85ee404abbf9b22df1ae721c
parent 1c2b6e5e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -303,10 +303,10 @@ status_t BnCameraService::onTransact(
            reply->writeInt32(result);

            // out-variables are after exception and return value
            reply->writeInt32(1); // means the parcelable is included
            if (d == NULL) {
                reply->writeInt32(0);
            } else {
                reply->writeInt32(1); // means the parcelable is included
                d->writeToParcel(reply);
            }
            return NO_ERROR;
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ status_t VendorTagDescriptor::writeToParcel(Parcel* parcel) const {
    return res;
}

status_t VendorTagDescriptor::setAsGlobalVendorTagDescriptor(sp<VendorTagDescriptor>& desc) {
status_t VendorTagDescriptor::setAsGlobalVendorTagDescriptor(const sp<VendorTagDescriptor>& desc) {
    status_t res = OK;
    Mutex::Autolock al(sLock);
    sGlobalVendorTagDescriptor = desc;
+7 −3
Original line number Diff line number Diff line
@@ -60,12 +60,16 @@ public:

    virtual int32_t  getNumberOfCameras() = 0;
    virtual status_t getCameraInfo(int cameraId,
            /*out*/
            struct CameraInfo* cameraInfo) = 0;

    virtual status_t getCameraCharacteristics(int cameraId,
            /*out*/
            CameraMetadata* cameraInfo) = 0;

    virtual status_t getCameraVendorTagDescriptor(sp<VendorTagDescriptor>& desc) = 0;
    virtual status_t getCameraVendorTagDescriptor(
            /*out*/
            sp<VendorTagDescriptor>& desc) = 0;

    // Returns 'OK' if operation succeeded
    // - Errors: ALREADY_EXISTS if the listener was already added
+4 −2
Original line number Diff line number Diff line
@@ -63,7 +63,9 @@ class VendorTagDescriptor
         *
         * Returns OK on success, or a negative error code.
         */
        status_t writeToParcel(/*out*/Parcel* parcel) const;
        status_t writeToParcel(
                /*out*/
                Parcel* parcel) const;

        // Static methods:

@@ -93,7 +95,7 @@ class VendorTagDescriptor
         *
         * Returns OK on success, or a negative error code.
         */
        static status_t setAsGlobalVendorTagDescriptor(sp<VendorTagDescriptor>& desc);
        static status_t setAsGlobalVendorTagDescriptor(const sp<VendorTagDescriptor>& desc);

        /**
         * Clears the global vendor tag descriptor used by this process.
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ status_t CameraService::getCameraVendorTagDescriptor(/*out*/sp<VendorTagDescript

    if (mModule->common.module_api_version < CAMERA_MODULE_API_VERSION_2_2) {
        // TODO: Remove this check once HAL1 shim is in place.
        ALOGE("%s: Only HAL module version V2.2 or higher supports vendor tags", __FUNCTION__);
        ALOGW("%s: Only HAL module version V2.2 or higher supports vendor tags", __FUNCTION__);
        return -EOPNOTSUPP;
    }