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
commit89ed7c74b236f9cf973172e8251236a28e099351 (patch)
tree3c62db73ad4dc233b49891b26bc102f25a56873e
parent5c49582eed25d81ec0147977d973d6170eb7e126 (diff)
parent63b68cee3cecd4dbeca7a2ecf94f1eadf845ae46 (diff)
downloadhardware_ti_omap4-89ed7c74b236f9cf973172e8251236a28e099351.zip
hardware_ti_omap4-89ed7c74b236f9cf973172e8251236a28e099351.tar.gz
hardware_ti_omap4-89ed7c74b236f9cf973172e8251236a28e099351.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;
}