From fabe648a29531b8a52984dcf31ea6e601eefe130 Mon Sep 17 00:00:00 2001 From: Jaekyu Park Date: Fri, 27 May 2016 16:52:14 +0900 Subject: Tizen 2.4 SDK Rev6 Release --- include/locations.h | 3 --- src/locations.c | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/locations.h b/include/locations.h index 746306f..d23b3bb 100644 --- a/include/locations.h +++ b/include/locations.h @@ -972,13 +972,10 @@ int gps_status_set_satellite_updated_cb(location_manager_h manager, gps_status_s /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @privlevel public - * @privilege %http://tizen.org/privilege/location * @param[in] manager The location manager handle * @return @c 0 on success, otherwise a negative error value * @retval #LOCATIONS_ERROR_NONE Successful * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported * @see gps_status_set_satellite_updated_cb() */ diff --git a/src/locations.c b/src/locations.c index 3fe8cce..270332b 100755 --- a/src/locations.c +++ b/src/locations.c @@ -1270,7 +1270,14 @@ EXPORT_API int gps_status_set_satellite_updated_cb(location_manager_h manager, g LOCATIONS_NULL_ARG_CHECK(callback); location_manager_s *handle = (location_manager_s *) manager; - location_set_option(handle->object, "USE_SV"); + int ret = location_set_option(handle->object, "USE_SV"); + if (ret != LOCATION_ERROR_NONE) { + if (ret == LOCATION_ERROR_NOT_ALLOWED) { + LOCATIONS_LOGE("LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED"); + return LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED; + } + return ret; + } g_object_set(handle->object, "sat-interval", interval, NULL); return __set_callback(_LOCATIONS_EVENT_TYPE_SATELLITE, manager, callback, user_data); } -- cgit v1.2.3