summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-21 12:21:43 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-21 12:21:43 +0100
commitf375843b52d6737d46136908042f1121a2f29b67 (patch)
treeba7babf8405e4a720931c0e96249f58228e4d56c
parent10ca1be6d72cb15c085cc936f8a0f5d3fd743de8 (diff)
downloaddevice_samsung_p3100-f375843b52d6737d46136908042f1121a2f29b67.zip
device_samsung_p3100-f375843b52d6737d46136908042f1121a2f29b67.tar.gz
device_samsung_p3100-f375843b52d6737d46136908042f1121a2f29b67.tar.bz2
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
-rw-r--r--camerawrapper/CameraWrapper.cpp7
1 files changed, 2 insertions, 5 deletions
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());