diff options
Diffstat (limited to 'camera')
-rw-r--r-- | camera/CameraWrapper.cpp | 27 |
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(); |