camera3: Disable ZSL for limited mode camera HALs
Bug: 9111852
Change-Id: Idad7e0d2f912341bd643d0ad1a0861fb2043aa90
diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp
index 49fc3d8..a248b76 100644
--- a/services/camera/libcameraservice/camera2/Parameters.cpp
+++ b/services/camera/libcameraservice/camera2/Parameters.cpp
@@ -795,13 +795,21 @@
previewCallbackFlags = 0;
previewCallbackOneShot = 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;