summaryrefslogtreecommitdiffstats
path: root/libcamera
diff options
context:
space:
mode:
authorkyoungho.yun <kyoungho.yun@samsung.com>2011-08-12 15:59:35 +0900
committerWu-cheng Li <wuchengli@google.com>2011-08-16 13:54:12 +0800
commit7ad27c243d66b7fbef051dd4bdb064342dfd72c5 (patch)
treed05f24ec4157ed7eda059fddd2ba0ee90cecfc8b /libcamera
parent8052085a5b2d403bebe0f89b96969b3fd88eb22f (diff)
downloaddevice_samsung_crespo-7ad27c243d66b7fbef051dd4bdb064342dfd72c5.zip
device_samsung_crespo-7ad27c243d66b7fbef051dd4bdb064342dfd72c5.tar.gz
device_samsung_crespo-7ad27c243d66b7fbef051dd4bdb064342dfd72c5.tar.bz2
5PC11X: CAMERA: Fix Issue 5143943(SceneMode Fail)
Fix android.hardware.cts.CameraTest#testSceneMode fail Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com> bug:5143943 Change-Id: Ia91725ff154a6450fe36393878e7f3e7c49d9a1b
Diffstat (limited to 'libcamera')
-rwxr-xr-x[-rw-r--r--]libcamera/SecCameraHWInterface.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp
index 34f1009..fb108bd 100644..100755
--- a/libcamera/SecCameraHWInterface.cpp
+++ b/libcamera/SecCameraHWInterface.cpp
@@ -1817,6 +1817,7 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
if (!strcmp(new_scene_mode_str, CameraParameters::SCENE_MODE_AUTO)) {
new_scene_mode = SCENE_MODE_NONE;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "on,off,auto,torch");
} else {
// defaults for non-auto scene modes
if (mSecCamera->getCameraId() == SecCamera::CAMERA_ID_BACK) {
@@ -1828,36 +1829,52 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params)
CameraParameters::SCENE_MODE_PORTRAIT)) {
new_scene_mode = SCENE_MODE_PORTRAIT;
new_flash_mode_str = CameraParameters::FLASH_MODE_AUTO;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "auto");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_LANDSCAPE)) {
new_scene_mode = SCENE_MODE_LANDSCAPE;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_SPORTS)) {
new_scene_mode = SCENE_MODE_SPORTS;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_PARTY)) {
new_scene_mode = SCENE_MODE_PARTY_INDOOR;
new_flash_mode_str = CameraParameters::FLASH_MODE_AUTO;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "auto");
} else if ((!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_BEACH)) ||
(!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_SNOW))) {
new_scene_mode = SCENE_MODE_BEACH_SNOW;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_SUNSET)) {
new_scene_mode = SCENE_MODE_SUNSET;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_NIGHT)) {
new_scene_mode = SCENE_MODE_NIGHTSHOT;
mParameters.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, "(4000,30000)");
mParameters.set(CameraParameters::KEY_PREVIEW_FPS_RANGE,
"4000,30000");
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_FIREWORKS)) {
new_scene_mode = SCENE_MODE_FIREWORKS;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else if (!strcmp(new_scene_mode_str,
CameraParameters::SCENE_MODE_CANDLELIGHT)) {
new_scene_mode = SCENE_MODE_CANDLE_LIGHT;
+ new_flash_mode_str = CameraParameters::FLASH_MODE_OFF;
+ mParameters.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "off");
} else {
LOGE("%s::unmatched scene_mode(%s)",
__func__, new_scene_mode_str); //action, night-portrait, theatre, steadyphoto