diff options
| author | LuK1337 <priv.luk@gmail.com> | 2016-02-26 18:47:55 +0100 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-03-10 07:27:09 -0800 |
| commit | 9df826fff9afce2c9007687ce6a07ada220edf48 (patch) | |
| tree | 18f7080f7aa5d07235e7060a32c6e86920760092 /camera | |
| parent | 6d2c6fe24a86d716dfcd6e652b1de43872815d6e (diff) | |
msm8916-common: camera: Save cur-focus-scale and cur-focus-diopter
* Those params are used in Snap camera. Without
setting them it simply says the current value
is "null".
Change-Id: Ia45123dcf99a521d6b541c30c058ff6e8bc56424
Diffstat (limited to 'camera')
| -rw-r--r-- | camera/CameraWrapper.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp index 7eda98a..6ae3b59 100644 --- a/camera/CameraWrapper.cpp +++ b/camera/CameraWrapper.cpp @@ -118,6 +118,24 @@ static char *camera_fixup_getparams(int id, const char *settings) params.set("longshot-supported", "false"); + const char *manualFocusPosition = params.get("manual-focus-position"); + const char *manualFocusPositionType = params.get("manual-focus-pos-type"); + if (manualFocusPositionType != NULL) { + if (!strcmp(manualFocusPositionType, "2")) { + if (manualFocusPosition != NULL) { + params.set("cur-focus-scale", manualFocusPosition); + } else { + params.set("cur-focus-scale", "0"); + } + } else if (!strcmp(manualFocusPositionType, "3")) { + if (manualFocusPosition != NULL) { + params.set("cur-focus-diopter", manualFocusPosition); + } else { + params.set("cur-focus-diopter", "0"); + } + } + } + #if !LOG_NDEBUG ALOGV("%s: fixed parameters:", __FUNCTION__); params.dump(); |
