summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-21 12:20:04 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-21 12:20:04 +0100
commita41035dc757852c3412b95d902bbd66afce98464 (patch)
tree0d20b96edc7821e7bf61fe5bc31583adbcaa4339
parente70ee8b7c56364539503087b216807233e2b9d83 (diff)
downloaddevice_samsung_p5100-a41035dc757852c3412b95d902bbd66afce98464.zip
device_samsung_p5100-a41035dc757852c3412b95d902bbd66afce98464.tar.gz
device_samsung_p5100-a41035dc757852c3412b95d902bbd66afce98464.tar.bz2
p51xx: 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: I436018b30b69f31ef3b3e2c7401aac786bb7a6b1
-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());