diff options
author | Maarten Hooft <mthooft@google.com> | 2010-10-24 14:38:43 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-24 14:38:43 -0700 |
commit | 8b24ebe9c3c387c4f00585a08c4af610fe4d8fca (patch) | |
tree | 85ee538e003bfc3346766e6b242f52957771ecf8 /libcamera/SecCameraHWInterface.cpp | |
parent | 456869b6d03338ad10a24e1b3b84f84e1cbe5fd5 (diff) | |
parent | 1d2473857dbf657673da207a15e752cbacac5510 (diff) | |
download | device_samsung_crespo-8b24ebe9c3c387c4f00585a08c4af610fe4d8fca.zip device_samsung_crespo-8b24ebe9c3c387c4f00585a08c4af610fe4d8fca.tar.gz device_samsung_crespo-8b24ebe9c3c387c4f00585a08c4af610fe4d8fca.tar.bz2 |
am 1d247385: am 2cd9fac4: Merge "libcamera: Add torch mode of flash" into gingerbread
Merge commit '1d2473857dbf657673da207a15e752cbacac5510'
* commit '1d2473857dbf657673da207a15e752cbacac5510':
libcamera: Add torch mode of flash
Diffstat (limited to 'libcamera/SecCameraHWInterface.cpp')
-rw-r--r-- | libcamera/SecCameraHWInterface.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp index a82ba7a..4a16bc2 100644 --- a/libcamera/SecCameraHWInterface.cpp +++ b/libcamera/SecCameraHWInterface.cpp @@ -268,6 +268,8 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) parameterString.append(CameraParameters::FLASH_MODE_OFF); parameterString.append(","); parameterString.append(CameraParameters::FLASH_MODE_AUTO); + parameterString.append(","); + parameterString.append(CameraParameters::FLASH_MODE_TORCH); p.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, parameterString.string()); p.set(CameraParameters::KEY_FLASH_MODE, @@ -1948,6 +1950,8 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) new_flash_mode = FLASH_MODE_AUTO; else if (!strcmp(new_flash_mode_str, CameraParameters::FLASH_MODE_ON)) new_flash_mode = FLASH_MODE_ON; + else if (!strcmp(new_flash_mode_str, CameraParameters::FLASH_MODE_TORCH)) + new_flash_mode = FLASH_MODE_TORCH; else { LOGE("%s::unmatched flash_mode(%s)", __func__, new_flash_mode_str); //red-eye ret = UNKNOWN_ERROR; |