From f375843b52d6737d46136908042f1121a2f29b67 Mon Sep 17 00:00:00 2001 From: codeworkx Date: Fri, 21 Dec 2012 12:21:43 +0100 Subject: p31xx: set min/max exposure compensation values Camera supports -4 to 4, Camera app only -3 to 3. So fake it here to not crash Camera app till it's patched. Change-Id: I425c607bbaad06851f2ccad49787abbf305a7ae4 --- camerawrapper/CameraWrapper.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'camerawrapper') diff --git a/camerawrapper/CameraWrapper.cpp b/camerawrapper/CameraWrapper.cpp index 373f351..ba6f90a 100644 --- a/camerawrapper/CameraWrapper.cpp +++ b/camerawrapper/CameraWrapper.cpp @@ -91,17 +91,14 @@ static int check_vendor_module() return rv; } -const static char * exposure_values[] = {"0","0"}; - static char * camera_fixup_getparams(int id, const char * settings) { android::CameraParameters params; params.unflatten(android::String8(settings)); // fix params here - params.set(android::CameraParameters::KEY_EXPOSURE_COMPENSATION, exposure_values[id]); - params.set(android::CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "0"); - params.set(android::CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION, "0"); + params.set(android::CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "-3"); + params.set(android::CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION, "3"); android::String8 strParams = params.flatten(); char *ret = strdup(strParams.string()); -- cgit v1.1