Loading services/camera/libcameraservice/common/CameraProviderManager.cpp +28 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,34 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addDynamicDepthTags( return OK; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTags() { status_t res = OK; auto& c = mCameraCharacteristics; auto flashInfoStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL); if (flashInfoStrengthDefaultLevelEntry.count == 0) { int32_t flashInfoStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL, &flashInfoStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL: %s (%d)", __FUNCTION__,strerror(-res), res); return res; } } auto flashInfoStrengthMaximumLevelEntry = c.find(ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL); if (flashInfoStrengthMaximumLevelEntry.count == 0) { int32_t flashInfoStrengthMaximumLevel = 1; res = c.update(ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL, &flashInfoStrengthMaximumLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_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 @@ -667,6 +667,7 @@ private: void queryPhysicalCameraIds(); SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t addDynamicDepthTags(bool maxResolution = false); status_t deriveHeicTags(bool maxResolution = false); status_t addRotateCropTags(); Loading services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,13 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( if (flashAvailable.count == 1 && flashAvailable.data.u8[0] == ANDROID_FLASH_INFO_AVAILABLE_TRUE) { mHasFlashUnit = true; // Fix up flash strength tags for devices without these keys. res = fixupTorchStrengthTags(); if (OK != res) { ALOGE("%s: Unable to add default ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL and" "ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL tags: %s (%d)", __FUNCTION__, strerror(-res), res); } } else { mHasFlashUnit = false; } Loading services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -662,6 +662,13 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( if (flashAvailable.count == 1 && flashAvailable.data.u8[0] == ANDROID_FLASH_INFO_AVAILABLE_TRUE) { mHasFlashUnit = true; // Fix up flash strength tags for devices without these keys. res = fixupTorchStrengthTags(); if (OK != res) { ALOGE("%s: Unable to add default ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL and" "ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL tags: %s (%d)", __FUNCTION__, strerror(-res), res); } } else { mHasFlashUnit = false; } Loading Loading
services/camera/libcameraservice/common/CameraProviderManager.cpp +28 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,34 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::addDynamicDepthTags( return OK; } status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fixupTorchStrengthTags() { status_t res = OK; auto& c = mCameraCharacteristics; auto flashInfoStrengthDefaultLevelEntry = c.find(ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL); if (flashInfoStrengthDefaultLevelEntry.count == 0) { int32_t flashInfoStrengthDefaultLevel = 1; res = c.update(ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL, &flashInfoStrengthDefaultLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL: %s (%d)", __FUNCTION__,strerror(-res), res); return res; } } auto flashInfoStrengthMaximumLevelEntry = c.find(ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL); if (flashInfoStrengthMaximumLevelEntry.count == 0) { int32_t flashInfoStrengthMaximumLevel = 1; res = c.update(ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL, &flashInfoStrengthMaximumLevel, 1); if (res != OK) { ALOGE("%s: Failed to update ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_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 @@ -667,6 +667,7 @@ private: void queryPhysicalCameraIds(); SystemCameraKind getSystemCameraKind(); status_t fixupMonochromeTags(); status_t fixupTorchStrengthTags(); status_t addDynamicDepthTags(bool maxResolution = false); status_t deriveHeicTags(bool maxResolution = false); status_t addRotateCropTags(); Loading
services/camera/libcameraservice/common/aidl/AidlProviderInfo.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,13 @@ AidlProviderInfo::AidlDeviceInfo3::AidlDeviceInfo3( if (flashAvailable.count == 1 && flashAvailable.data.u8[0] == ANDROID_FLASH_INFO_AVAILABLE_TRUE) { mHasFlashUnit = true; // Fix up flash strength tags for devices without these keys. res = fixupTorchStrengthTags(); if (OK != res) { ALOGE("%s: Unable to add default ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL and" "ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL tags: %s (%d)", __FUNCTION__, strerror(-res), res); } } else { mHasFlashUnit = false; } Loading
services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -662,6 +662,13 @@ HidlProviderInfo::HidlDeviceInfo3::HidlDeviceInfo3( if (flashAvailable.count == 1 && flashAvailable.data.u8[0] == ANDROID_FLASH_INFO_AVAILABLE_TRUE) { mHasFlashUnit = true; // Fix up flash strength tags for devices without these keys. res = fixupTorchStrengthTags(); if (OK != res) { ALOGE("%s: Unable to add default ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL and" "ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL tags: %s (%d)", __FUNCTION__, strerror(-res), res); } } else { mHasFlashUnit = false; } Loading