summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-06-13 11:22:47 -0700
committerAlex Ray <aray@google.com>2013-06-13 13:15:14 -0700
commit03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17 (patch)
tree97f3e34bc695fa60e14bf9857afedc9749f7f187 /services
parent52b943e8036aa6ebd15131820d196fedb321613d (diff)
downloadframeworks_av-03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17.zip
frameworks_av-03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17.tar.gz
frameworks_av-03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17.tar.bz2
camera2: accept 4-value active array size
Change-Id: Ia320a022b201a938a025efc30a54c05fcfe5b02f
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/camera2/Parameters.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp
index a567c15..e8f3f50 100644
--- a/services/camera/libcameraservice/camera2/Parameters.cpp
+++ b/services/camera/libcameraservice/camera2/Parameters.cpp
@@ -837,10 +837,17 @@ String8 Parameters::get() const {
status_t Parameters::buildFastInfo() {
camera_metadata_ro_entry_t activeArraySize =
- staticInfo(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, 2, 2);
+ staticInfo(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, 2, 4);
if (!activeArraySize.count) return NO_INIT;
- int32_t arrayWidth = activeArraySize.data.i32[0];
- int32_t arrayHeight = activeArraySize.data.i32[1];
+ int32_t arrayWidth;
+ int32_t arrayHeight;
+ if (activeArraySize.count == 2) {
+ arrayWidth = activeArraySize.data.i32[0];
+ arrayHeight = activeArraySize.data.i32[1];
+ } else if (activeArraySize.count == 4) {
+ arrayWidth = activeArraySize.data.i32[2];
+ arrayHeight = activeArraySize.data.i32[3];
+ } else return NO_INIT;
camera_metadata_ro_entry_t availableFaceDetectModes =
staticInfo(ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES, 0, 0,