diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2015-06-22 14:26:51 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2015-06-22 15:07:34 -0700 |
commit | a3b3caaae3fc23b99c5c455ee429f79c270cfbae (patch) | |
tree | 0e23fd4afb42e4b1aa48f73e5862c5358b539afa /services/camera | |
parent | 99b38856e91a55bb67085dbabffac9739998fe8b (diff) | |
download | frameworks_av-a3b3caaae3fc23b99c5c455ee429f79c270cfbae.zip frameworks_av-a3b3caaae3fc23b99c5c455ee429f79c270cfbae.tar.gz frameworks_av-a3b3caaae3fc23b99c5c455ee429f79c270cfbae.tar.bz2 |
Add default for pre-distortion active array.
Bug: 20491394
Change-Id: I53b0539b37cc7a042e6765c97775b8c2bbba7159
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/common/CameraModule.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/common/CameraModule.cpp b/services/camera/libcameraservice/common/CameraModule.cpp index fcbf958..85d4488 100644 --- a/services/camera/libcameraservice/common/CameraModule.cpp +++ b/services/camera/libcameraservice/common/CameraModule.cpp @@ -132,6 +132,15 @@ void CameraModule::deriveCameraCharacteristicsKeys( highSpeedConfig); } } + + // Always add a default for the pre-correction active array if the vendor chooses to omit this + camera_metadata_entry entry = chars.find(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE); + if (entry.count == 0) { + entry = chars.find(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE); + chars.update(ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, entry.data.i32, + entry.count); + } + return; } |