From 28cd3f3375476cbf437241bfc5efb223a73955b8 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Wed, 30 Oct 2013 18:08:11 +0000 Subject: 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 --- camera/exynos_exif.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'camera/exynos_exif.c') diff --git a/camera/exynos_exif.c b/camera/exynos_exif.c index 2ba4ca1..b0d1656 100644 --- a/camera/exynos_exif.c +++ b/camera/exynos_exif.c @@ -195,6 +195,7 @@ int exynos_exif_attributes_create_gps(struct exynos_camera *exynos_camera, snprintf((char *) attributes->gps_datestamp, sizeof(attributes->gps_datestamp), "%04d:%02d:%02d", time_info.tm_year + 1900, time_info.tm_mon + 1, time_info.tm_mday); + strcpy((char *) attributes->gps_processing_method, gps_processing_method_string); attributes->enableGps = true; return 0; @@ -423,6 +424,8 @@ int exynos_exif_start(struct exynos_camera *exynos_camera, struct exynos_exif *e return -1; } + memset(&exif->attributes, 0, sizeof(exif_attribute_t)); + rc = exynos_exif_attributes_create_static(exynos_camera, exif); if (rc < 0) { ALOGE("%s: Unable to create exif attributes", __func__); -- cgit v1.1