summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-11-17 22:49:55 -0800
committerJames Dong <jdong@google.com>2011-11-17 22:49:55 -0800
commit0bb5454945320db77ff426baf9c0c34631c373ab (patch)
treeb99e239ef51d4527558da35f72b453d1ba55cf18 /camera
parentc0cf33c94e3f6c81d622be4062c9ba4c9c51cc4d (diff)
downloadhardware_ti_omap4xxx-0bb5454945320db77ff426baf9c0c34631c373ab.zip
hardware_ti_omap4xxx-0bb5454945320db77ff426baf9c0c34631c373ab.tar.gz
hardware_ti_omap4xxx-0bb5454945320db77ff426baf9c0c34631c373ab.tar.bz2
Ignore camera.flash_off system property for user build
This system property is meant for testing only and should be ignored for user build. Change-Id: I553b68d62f41012766d7d208451a178a733d151e related-to-bug: 5617451
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMX3A.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp
index be4c0e7..ef02e49 100644
--- a/camera/OMXCameraAdapter/OMX3A.cpp
+++ b/camera/OMXCameraAdapter/OMX3A.cpp
@@ -482,14 +482,20 @@ static bool isFlashDisabled() {
#error "PROPERTY_VALUE_MAX must be at least 5"
#endif
+ // Ignore flash_off system property for user build.
+ char buildType[PROPERTY_VALUE_MAX];
+ if (property_get("ro.build.type", buildType, NULL) &&
+ !strcasecmp(buildType, "user")) {
+ return false;
+ }
+
char value[PROPERTY_VALUE_MAX];
if (property_get("camera.flash_off", value, NULL) &&
(!strcasecmp(value, "true") || !strcasecmp(value, "1"))) {
- LOGW("flash is turned off");
+ LOGW("flash is disabled for testing purpose");
return true;
}
- LOGI("flash is turned on");
return false;
}