diff options
author | Ed Heyl <edheyl@google.com> | 2013-05-24 12:40:59 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-24 12:40:59 -0700 |
commit | 4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e (patch) | |
tree | d4cd1a437b2a9df3ce8a630fbd8e2e0aebdfd499 /services/camera/libcameraservice/camera2/Parameters.cpp | |
parent | 1f02e27d0d8be96dd9d2c515b3e2c1fbf28b1922 (diff) | |
parent | 14e585c8e0667c13202dbefc52f9d00ffe161cf1 (diff) | |
download | frameworks_av-4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e.zip frameworks_av-4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e.tar.gz frameworks_av-4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e.tar.bz2 |
am 14e585c8: am 6947f125: Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev
* commit '14e585c8e0667c13202dbefc52f9d00ffe161cf1':
camera3: Disable ZSL for limited mode camera HALs
Diffstat (limited to 'services/camera/libcameraservice/camera2/Parameters.cpp')
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp index 6225198..5a9fd88 100644 --- a/services/camera/libcameraservice/camera2/Parameters.cpp +++ b/services/camera/libcameraservice/camera2/Parameters.cpp @@ -796,13 +796,21 @@ status_t Parameters::initialize(const CameraMetadata *info) { previewCallbackOneShot = false; previewCallbackSurface = false; - char value[PROPERTY_VALUE_MAX]; - property_get("camera.disable_zsl_mode", value, "0"); - if (!strcmp(value,"1")) { - ALOGI("Camera %d: Disabling ZSL mode", cameraId); + camera_metadata_ro_entry_t supportedHardwareLevel = + staticInfo(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL); + if (!supportedHardwareLevel.count || (supportedHardwareLevel.data.u8[0] == + ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED)) { + ALOGI("Camera %d: ZSL mode disabled for limited mode HALs", cameraId); zslMode = false; } else { - zslMode = true; + char value[PROPERTY_VALUE_MAX]; + property_get("camera.disable_zsl_mode", value, "0"); + if (!strcmp(value,"1")) { + ALOGI("Camera %d: Disabling ZSL mode", cameraId); + zslMode = false; + } else { + zslMode = true; + } } lightFx = LIGHTFX_NONE; |