summaryrefslogtreecommitdiffstats
path: root/camera/exynos_camera.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-10-30 18:08:11 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-10-30 18:17:03 +0000
commit28cd3f3375476cbf437241bfc5efb223a73955b8 (patch)
treee9387905bd77797702030008ed3f9ed61879f0b4 /camera/exynos_camera.c
parent2d2391e849650ecab9dc3344b58b649c201293b2 (diff)
downloaddevice_samsung_smdk4412-common-28cd3f3375476cbf437241bfc5efb223a73955b8.tar.gz
device_samsung_smdk4412-common-28cd3f3375476cbf437241bfc5efb223a73955b8.tar.bz2
device_samsung_smdk4412-common-28cd3f3375476cbf437241bfc5efb223a73955b8.zip
camera: Fix disabling location
If Camera.removeGpsData() is invoked from the userland API, we must invalidate the previously stored GPS data to prevent it from being saved in EXIF. Fixes the invalid storing of location data after an explicit disable Fixes android.hardware.cts.CameraTest#testJpegExif Change-Id: I9618a27ab9def974bac1d69871c3454300fb4c29
Diffstat (limited to 'camera/exynos_camera.c')
-rw-r--r--camera/exynos_camera.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c
index 7b2875b..2a12243 100644
--- a/camera/exynos_camera.c
+++ b/camera/exynos_camera.c
@@ -4237,6 +4237,15 @@ int exynos_camera_set_parameters(struct camera_device *dev,
exynos_camera = (struct exynos_camera *) dev->priv;
+ if (strstr(params, "gps-timestamp=") == NULL) {
+ /* Make sure the GPS data is ignored, it may have
+ * been explicitly erased with removeGpsData()
+ */
+ exynos_param_int_set(exynos_camera, "gps-timestamp", -1);
+ exynos_param_int_set(exynos_camera, "gps-latitude", -1);
+ exynos_param_int_set(exynos_camera, "gps-longitude", -1);
+ }
+
rc = exynos_params_string_set(exynos_camera, (char *) params);
if (rc < 0) {
ALOGE("%s: Unable to set params string", __func__);