diff options
author | James Dong <jdong@google.com> | 2011-11-17 22:49:55 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-11-17 22:49:55 -0800 |
commit | 63b68cee3cecd4dbeca7a2ecf94f1eadf845ae46 (patch) | |
tree | 60afee0276651db3d2a89e9692ce05c6a12657b0 /camera | |
parent | 064fd30b901a8a7138791cfae7e53401cc2a956d (diff) | |
download | hardware_ti_omap4-63b68cee3cecd4dbeca7a2ecf94f1eadf845ae46.zip hardware_ti_omap4-63b68cee3cecd4dbeca7a2ecf94f1eadf845ae46.tar.gz hardware_ti_omap4-63b68cee3cecd4dbeca7a2ecf94f1eadf845ae46.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.cpp | 10 |
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; } |