Camera: Only report dynamic depth tag related errors

Failing to add dynamic depth camera characteristics
must not have any additional side effects for the
device info constructor.
In case we encounter any issues report the failure and
try to continue with the intitialization.
Additionally fix a minor typo and remove a debug log.

Bug: 123660999
Test: Manual using application,
Camera CTS
Change-Id: I7b4e723ce3bcaf0e5d4c313ba17bca965e8964d8
gugelfrei
Emilian Peev 6 years ago
parent af87b70710
commit a1185162c4

@ -648,7 +648,7 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addDynamicDepthTags()
bool isDepthExclusivePresent = std::find(chTags.data.i32, chTags.data.i32 + chTags.count,
depthExclTag) != (chTags.data.i32 + chTags.count);
bool isDepthSizePresent = std::find(chTags.data.i32, chTags.data.i32 + chTags.count,
depthExclTag) != (chTags.data.i32 + chTags.count);
depthSizesTag) != (chTags.data.i32 + chTags.count);
if (!(isDepthExclusivePresent && isDepthSizePresent)) {
// No depth support, nothing more to do.
return OK;
@ -676,7 +676,6 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addDynamicDepthTags()
getSupportedDynamicDepthSizes(supportedBlobSizes, supportedDepthSizes,
&supportedDynamicDepthSizes, &internalDepthSizes);
if (supportedDynamicDepthSizes.empty()) {
ALOGE("%s: No dynamic depth size matched!", __func__);
// Nothing more to do.
return OK;
}
@ -1715,11 +1714,10 @@ CameraProviderManager::ProviderInfo::DeviceInfo3::DeviceInfo3(const std::string&
__FUNCTION__, strerror(-res), res);
return;
}
res = addDynamicDepthTags();
if (OK != res) {
ALOGE("%s: Failed appending dynamic depth tags: %s (%d)", __FUNCTION__, strerror(-res),
res);
return;
auto stat = addDynamicDepthTags();
if (OK != stat) {
ALOGE("%s: Failed appending dynamic depth tags: %s (%d)", __FUNCTION__, strerror(-stat),
stat);
}
camera_metadata_entry flashAvailable =
mCameraCharacteristics.find(ANDROID_FLASH_INFO_AVAILABLE);

Loading…
Cancel
Save