Merge "Camera: Fix error handling for reading in vendor tags" into nyc-dev

This commit is contained in:
Eino-Ville Talvala
2016-03-03 20:21:00 +00:00
committed by Android (Google) Code Review

View File

@@ -918,15 +918,14 @@ static jint CameraMetadata_setupGlobalVendorTagDescriptor(JNIEnv *env, jobject t
sp<VendorTagDescriptor> desc = new VendorTagDescriptor(); sp<VendorTagDescriptor> desc = new VendorTagDescriptor();
binder::Status res = cameraService->getCameraVendorTagDescriptor(/*out*/desc.get()); binder::Status res = cameraService->getCameraVendorTagDescriptor(/*out*/desc.get());
if (res.serviceSpecificErrorCode() == hardware::ICameraService::ERROR_DEPRECATED_HAL) { if (res.serviceSpecificErrorCode() == hardware::ICameraService::ERROR_DISCONNECTED) {
ALOGW("%s: Camera HAL too old; does not support vendor tags", __FUNCTION__); // No camera module available, not an error on devices with no cameras
VendorTagDescriptor::clearGlobalVendorTagDescriptor(); VendorTagDescriptor::clearGlobalVendorTagDescriptor();
return OK; return OK;
} else if (!res.isOk()) { } else if (!res.isOk()) {
ALOGE("%s: Failed to setup vendor tag descriptors: %s: %s", VendorTagDescriptor::clearGlobalVendorTagDescriptor();
__FUNCTION__, res.serviceSpecificErrorCode(), ALOGE("%s: Failed to setup vendor tag descriptors: %s",
res.toString8().string()); __FUNCTION__, res.toString8().string());
return res.serviceSpecificErrorCode(); return res.serviceSpecificErrorCode();
} }