Loading services/camera/libcameraservice/common/CameraProviderManager.cpp +50 −0 Original line number Diff line number Diff line Loading @@ -1487,6 +1487,56 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTag return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags() { status_t res = OK; auto& c = mCameraCharacteristics; auto flashSingleStrengthMaxLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); if (flashSingleStrengthMaxLevelEntry.count == 0) { int32_t flashSingleStrengthMaxLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashSingleStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); if (flashSingleStrengthDefaultLevelEntry.count == 0) { int32_t flashSingleStrengthDefaultLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashTorchStrengthMaxLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); if (flashTorchStrengthMaxLevelEntry.count == 0) { int32_t flashTorchStrengthMaxLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashTorchStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); if (flashTorchStrengthDefaultLevelEntry.count == 0) { int32_t flashTorchStrengthDefaultLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupMonochromeTags() { status_t res = OK; auto& c = mCameraCharacteristics; Loading services/camera/libcameraservice/common/CameraProviderManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -683,6 +683,7 @@ private: SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t fixupManualFlashStrengthControlTags(); 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 +6 −0 Original line number Diff line number Diff line Loading @@ -494,6 +494,12 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( __FUNCTION__, strerror(-res), res); return; } res = fixupManualFlashStrengthControlTags(); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control 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), Loading services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -613,6 +613,14 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( __FUNCTION__, strerror(-res), res); return; } res = fixupManualFlashStrengthControlTags(); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control 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), Loading Loading
services/camera/libcameraservice/common/CameraProviderManager.cpp +50 −0 Original line number Diff line number Diff line Loading @@ -1487,6 +1487,56 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTag return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupManualFlashStrengthControlTags() { status_t res = OK; auto& c = mCameraCharacteristics; auto flashSingleStrengthMaxLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL); if (flashSingleStrengthMaxLevelEntry.count == 0) { int32_t flashSingleStrengthMaxLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashSingleStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL); if (flashSingleStrengthDefaultLevelEntry.count == 0) { int32_t flashSingleStrengthDefaultLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashTorchStrengthMaxLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL); if (flashTorchStrengthMaxLevelEntry.count == 0) { int32_t flashTorchStrengthMaxLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } auto flashTorchStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL); if (flashTorchStrengthDefaultLevelEntry.count == 0) { int32_t flashTorchStrengthDefaultLevel = 1; res = c.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)", __FUNCTION__,strerror(-res), res); return res; } } return res; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupMonochromeTags() { status_t res = OK; auto& c = mCameraCharacteristics; Loading
services/camera/libcameraservice/common/CameraProviderManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -683,6 +683,7 @@ private: SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t fixupManualFlashStrengthControlTags(); 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 +6 −0 Original line number Diff line number Diff line Loading @@ -494,6 +494,12 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( __FUNCTION__, strerror(-res), res); return; } res = fixupManualFlashStrengthControlTags(); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control 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), Loading
services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -613,6 +613,14 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( __FUNCTION__, strerror(-res), res); return; } res = fixupManualFlashStrengthControlTags(); if (OK != res) { ALOGE("%s: Unable to fix up manual flash strength control 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), Loading