Loading services/camera/libcameraservice/common/CameraProviderManager.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -1490,13 +1490,14 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTag return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags() { status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags( CameraMetadata& ch) { status_t res = OK; auto& c = mCameraCharacteristics; auto flashSingleStrengthMaxLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); auto flashSingleStrengthMaxLevelEntry = ch.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); if (flashSingleStrengthMaxLevelEntry.count == 0) { int32_t flashSingleStrengthMaxLevel = 1; res = c.update(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, res = ch.update(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, &flashSingleStrengthMaxLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL: %s (%d)", Loading @@ -1504,10 +1505,11 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashSingleStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); auto flashSingleStrengthDefaultLevelEntry = ch.find( ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); if (flashSingleStrengthDefaultLevelEntry.count == 0) { int32_t flashSingleStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, res = ch.update(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, &flashSingleStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL: %s (%d)", Loading @@ -1515,10 +1517,10 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashTorchStrengthMaxLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); auto flashTorchStrengthMaxLevelEntry = ch.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); if (flashTorchStrengthMaxLevelEntry.count == 0) { int32_t flashTorchStrengthMaxLevel = 1; res = c.update(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, res = ch.update(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, &flashTorchStrengthMaxLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL: %s (%d)", Loading @@ -1526,10 +1528,10 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashTorchStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); auto flashTorchStrengthDefaultLevelEntry = ch.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); if (flashTorchStrengthDefaultLevelEntry.count == 0) { int32_t flashTorchStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, res = ch.update(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, &flashTorchStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL: %s (%d)", Loading services/camera/libcameraservice/common/CameraProviderManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ private: SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t fixupManualFlashStrengthControlTags(); status_t fixupManualFlashStrengthControlTags(CameraMetadata& ch); status_t addDynamicDepthTags(bool maxResolution = false); status_t deriveHeicTags(bool maxResolution = false); status_t deriveJpegRTags(bool maxResolution = false); Loading services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( return; } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(); res = fixupManualFlashStrengthControlTags(mCameraCharacteristics); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); Loading Loading @@ -653,6 +653,15 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( ALOGE("%s: Unable to override zoomRatio related tags: %s (%d)", __FUNCTION__, strerror(-res), res); } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(mPhysicalCameraCharacteristics[id]); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); return; } } } } Loading services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( return; } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(); res = fixupManualFlashStrengthControlTags(mCameraCharacteristics); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); Loading Loading @@ -772,6 +772,15 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( ALOGE("%s: Unable to override zoomRatio related tags: %s (%d)", __FUNCTION__, strerror(-res), res); } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(mPhysicalCameraCharacteristics[id]); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); return; } } } } } Loading Loading
services/camera/libcameraservice/common/CameraProviderManager.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -1490,13 +1490,14 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTag return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags() { status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags( CameraMetadata& ch) { status_t res = OK; auto& c = mCameraCharacteristics; auto flashSingleStrengthMaxLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); auto flashSingleStrengthMaxLevelEntry = ch.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); if (flashSingleStrengthMaxLevelEntry.count == 0) { int32_t flashSingleStrengthMaxLevel = 1; res = c.update(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, res = ch.update(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, &flashSingleStrengthMaxLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL: %s (%d)", Loading @@ -1504,10 +1505,11 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashSingleStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); auto flashSingleStrengthDefaultLevelEntry = ch.find( ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); if (flashSingleStrengthDefaultLevelEntry.count == 0) { int32_t flashSingleStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, res = ch.update(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, &flashSingleStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL: %s (%d)", Loading @@ -1515,10 +1517,10 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashTorchStrengthMaxLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); auto flashTorchStrengthMaxLevelEntry = ch.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); if (flashTorchStrengthMaxLevelEntry.count == 0) { int32_t flashTorchStrengthMaxLevel = 1; res = c.update(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, res = ch.update(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, &flashTorchStrengthMaxLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL: %s (%d)", Loading @@ -1526,10 +1528,10 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStren return res; } } auto flashTorchStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); auto flashTorchStrengthDefaultLevelEntry = ch.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); if (flashTorchStrengthDefaultLevelEntry.count == 0) { int32_t flashTorchStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, res = ch.update(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, &flashTorchStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL: %s (%d)", Loading
services/camera/libcameraservice/common/CameraProviderManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ private: SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t fixupManualFlashStrengthControlTags(); status_t fixupManualFlashStrengthControlTags(CameraMetadata& ch); status_t addDynamicDepthTags(bool maxResolution = false); status_t deriveHeicTags(bool maxResolution = false); status_t deriveJpegRTags(bool maxResolution = false); Loading
services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( return; } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(); res = fixupManualFlashStrengthControlTags(mCameraCharacteristics); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); Loading Loading @@ -653,6 +653,15 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( ALOGE("%s: Unable to override zoomRatio related tags: %s (%d)", __FUNCTION__, strerror(-res), res); } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(mPhysicalCameraCharacteristics[id]); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); return; } } } } Loading
services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +10 −1 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( return; } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(); res = fixupManualFlashStrengthControlTags(mCameraCharacteristics); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); Loading Loading @@ -772,6 +772,15 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( ALOGE("%s: Unable to override zoomRatio related tags: %s (%d)", __FUNCTION__, strerror(-res), res); } if (flags::camera_manual_flash_strength_control()) { res = fixupManualFlashStrengthControlTags(mPhysicalCameraCharacteristics[id]); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control tags: %s (%d)", __FUNCTION__, strerror(-res), res); return; } } } } } Loading