diff options
author | Jaekyu Park <jk7744.park@samsung.com> | 2016-05-27 16:52:14 +0900 |
---|---|---|
committer | Jaekyu Park <jk7744.park@samsung.com> | 2016-05-27 16:52:14 +0900 |
commit | fabe648a29531b8a52984dcf31ea6e601eefe130 (patch) | |
tree | 04cc05d4570abf9313ac0db8e2846504fbbc5c2c | |
parent | bf166aa58682cd97949c61d6b1b69a7c0cd5e882 (diff) | |
download | location-manager-accepted/tizen_2.4_mobile.tar.gz location-manager-accepted/tizen_2.4_mobile.tar.bz2 location-manager-accepted/tizen_2.4_mobile.zip |
Tizen 2.4 SDK Rev6 Releasesubmit/tizen_2.4/20160530.023123accepted/tizen/2.4/mobile/20160530.220243tizen_2.4accepted/tizen_2.4_mobile
-rw-r--r-- | include/locations.h | 3 | ||||
-rwxr-xr-x | 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); } |