diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-09-11 18:25:17 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-11 18:25:18 -0700 |
commit | c4cb95449426b5715c6f737abb7eb95945f87166 (patch) | |
tree | b54e913138919694e1000efb4977ad2e2c8a0b1f /services/camera/libcameraservice | |
parent | 0eecaad0f873bdd50cb9dd6485ce584da57f0548 (diff) | |
parent | c33e4b59c48aff4c531ba33d03066b0fe101b8bf (diff) | |
download | frameworks_av-c4cb95449426b5715c6f737abb7eb95945f87166.zip frameworks_av-c4cb95449426b5715c6f737abb7eb95945f87166.tar.gz frameworks_av-c4cb95449426b5715c6f737abb7eb95945f87166.tar.bz2 |
Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev
Diffstat (limited to 'services/camera/libcameraservice')
-rw-r--r-- | services/camera/libcameraservice/Camera2Client.cpp | 9 | ||||
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.cpp | 10 |
2 files changed, 9 insertions, 10 deletions
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp index 4237afb..eb72412 100644 --- a/services/camera/libcameraservice/Camera2Client.cpp +++ b/services/camera/libcameraservice/Camera2Client.cpp @@ -64,15 +64,6 @@ Camera2Client::Camera2Client(const sp<CameraService>& cameraService, SharedParameters::Lock l(mParameters); l.mParameters.state = Parameters::DISCONNECTED; - - char value[PROPERTY_VALUE_MAX]; - property_get("camera.zsl_mode", value, "0"); - if (!strcmp(value,"1")) { - ALOGI("Camera %d: Enabling ZSL mode", cameraId); - l.mParameters.zslMode = true; - } else { - l.mParameters.zslMode = false; - } } status_t Camera2Client::checkPid(const char* checkLocation) const { diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp index f490b2a..c07a6ac 100644 --- a/services/camera/libcameraservice/camera2/Parameters.cpp +++ b/services/camera/libcameraservice/camera2/Parameters.cpp @@ -23,6 +23,7 @@ #include <math.h> #include <stdlib.h> +#include <cutils/properties.h> #include "Parameters.h" #include "system/camera.h" @@ -748,7 +749,14 @@ status_t Parameters::initialize(const CameraMetadata *info) { previewCallbackFlags = 0; - zslMode = false; + char value[PROPERTY_VALUE_MAX]; + property_get("camera.zsl_mode", value, "0"); + if (!strcmp(value,"1")) { + ALOGI("Camera %d: Enabling ZSL mode", cameraId); + zslMode = true; + } else { + zslMode = false; + } lightFx = LIGHTFX_NONE; |