summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-11-18 06:14:03 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-18 06:14:03 -0800
commitd31eec6653e19f86f9be5495ea461b4531646af9 (patch)
tree516f41b804b929ee8de7a5c52b8e460019c55093
parente46394481e771dbdc8683645c3740a3d262a3d0f (diff)
parent0bb5454945320db77ff426baf9c0c34631c373ab (diff)
downloadhardware_ti_omap4xxx-d31eec6653e19f86f9be5495ea461b4531646af9.zip
hardware_ti_omap4xxx-d31eec6653e19f86f9be5495ea461b4531646af9.tar.gz
hardware_ti_omap4xxx-d31eec6653e19f86f9be5495ea461b4531646af9.tar.bz2
am 0bb54549: Ignore camera.flash_off system property for user build
* commit '0bb5454945320db77ff426baf9c0c34631c373ab': Ignore camera.flash_off system property for user build
-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;
}