diff options
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; } |