summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-02 15:48:43 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-02 16:34:14 +0100
commit4ccae23384fea54dc633007d47ae820c071cf036 (patch)
tree9f1226a6086974fa62fc4392e2540355fd81913a /camera
parentddf7e489b95a138b56e852770a38e39786c4aad3 (diff)
downloaddevice_samsung_galaxys2-common-4ccae23384fea54dc633007d47ae820c071cf036.zip
device_samsung_galaxys2-common-4ccae23384fea54dc633007d47ae820c071cf036.tar.gz
device_samsung_galaxys2-common-4ccae23384fea54dc633007d47ae820c071cf036.tar.bz2
galaxys2: camera have iso
Change-Id: I103e58d0f115bc4560c152e9747847ea5ed4ac01
Diffstat (limited to 'camera')
-rw-r--r--camera/CameraWrapper.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
index 6e886a7..6e2f8c0 100644
--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -110,7 +110,7 @@ static char * camera_fixup_getparams(int id, const char * settings)
params.set(android::CameraParameters::KEY_PREVIEW_SIZE, videoSize);
}
- params.set("iso-values", iso_values[id]);
+ params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, iso_values[id]);
android::String8 strParams = params.flatten();
char *ret = strdup(strParams.string());
@@ -125,19 +125,18 @@ char * camera_fixup_setparams(int id, const char * settings)
params.unflatten(android::String8(settings));
// fix params here
-
- const char* isoMode = params.get("iso");
- if(isoMode) {
- if(!strcmp(isoMode, "ISO50"))
- params.set("iso", "50");
- else if(!strcmp(isoMode, "ISO100"))
- params.set("iso", "100");
- else if(!strcmp(isoMode, "ISO200"))
- params.set("iso", "200");
- else if(!strcmp(isoMode, "ISO400"))
- params.set("iso", "400");
- else if(!strcmp(isoMode, "ISO800"))
- params.set("iso", "800");
+ if(params.get("iso")) {
+ const char* isoMode = params.get(android::CameraParameters::KEY_ISO_MODE);
+ if(strcmp(isoMode, "ISO50") == 0)
+ params.set(android::CameraParameters::KEY_ISO_MODE, "50");
+ else if(strcmp(isoMode, "ISO100") == 0)
+ params.set(android::CameraParameters::KEY_ISO_MODE, "100");
+ else if(strcmp(isoMode, "ISO200") == 0)
+ params.set(android::CameraParameters::KEY_ISO_MODE, "200");
+ else if(strcmp(isoMode, "ISO400") == 0)
+ params.set(android::CameraParameters::KEY_ISO_MODE, "400");
+ else if(strcmp(isoMode, "ISO800") == 0)
+ params.set(android::CameraParameters::KEY_ISO_MODE, "800");
}
android::String8 strParams = params.flatten();