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

Commit 033a68ca authored by Igor Murashkin's avatar Igor Murashkin Committed by Android (Google) Code Review
Browse files

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

parents 630c0aba 5614cbe6
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -81,13 +81,8 @@ public final class CameraManager {
        mCameraService = CameraBinderDecorator.newInstance(cameraServiceRaw);

        try {
            int err = CameraMetadataNative.nativeSetupGlobalVendorTagDescriptor();
            if (err == CameraBinderDecorator.EOPNOTSUPP) {
                Log.w(TAG, "HAL version doesn't vendor tags.");
            } else {
                CameraBinderDecorator.throwOnError(CameraMetadataNative.
                        nativeSetupGlobalVendorTagDescriptor());
            }
            CameraBinderDecorator.throwOnError(
                    CameraMetadataNative.nativeSetupGlobalVendorTagDescriptor());
        } catch(CameraRuntimeException e) {
            throw new IllegalStateException("Failed to setup camera vendor tags",
                    e.asChecked());
+8 −3
Original line number Diff line number Diff line
@@ -579,9 +579,14 @@ static jint CameraMetadata_setupGlobalVendorTagDescriptor(JNIEnv *env, jobject t
    sp<VendorTagDescriptor> desc;
    err = cameraService->getCameraVendorTagDescriptor(/*out*/desc);

    if (err != OK) {
        ALOGE("%s: Failed to setup vendor tag descriptors, received error %s (%d)", __FUNCTION__,
                strerror(-err), err);
    if (err == -EOPNOTSUPP) {
        ALOGW("%s: Camera HAL too old; does not support vendor tags", __FUNCTION__);
        VendorTagDescriptor::clearGlobalVendorTagDescriptor();

        return OK;
    } else if (err != OK) {
        ALOGE("%s: Failed to setup vendor tag descriptors, received error %s (%d)",
                __FUNCTION__, strerror(-err), err);
        return err;
    }